Skip to content

Conversation

penandlim
Copy link
Contributor

Motivation

Some time ago, after this PR 4ae40da#diff-61de971a1475be0209ee9896ce71d6b3424904b26eb2ea0227d1ff23ee4e6e6bL585-L587

the rpc cache location was changed from
~/.foundry/cache/rpc/[chain]/[blockNumber]/storage.json
to
~/.foundry/cache/rpc/[chain]/[blockNumber]

However the cache ls function was not updated with this change.
This resulted forge cache ls listing very old caches that are not used anymore, but ignoring the newer caches as they are not directories.

Example:
Running forge cache ls with forge 0.2.0 (43b4e23 2024-02-25T00:21:15.546682000Z)

image

Note that the RPC caches are ignored in above output and the total sizes are do not include them.

Solution

Don't ignore files that are numeric only in their names when listing caches.

image

RPC caches are included and the total size of the cache is correctly displayed as well.

Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty!

@mattsse mattsse merged commit 576bb59 into foundry-rs:master Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants