workers-sdk
workers-sdk copied to clipboard
🚀 Feature Request: Auto-Purge Default Cache with `pages dev`
Describe the solution
Currently, when using the --persist flag with wrangler pages dev, the cache is entirely persisted to disk. While this is handy for emulating/testing cache behavior, it is difficult to use it for development purposes. Conversely, --persist is handy for caching Function calls/KV entries, so just not using the flag isn't ideal.
It would be nice if there were a way to have wrangler add a key to items stored to the Cache by the Pages Fileserver and then automatically clear assets with said key whenever changes are observed in the build output directory. This might also be good to have for Functions Cache too, depending on the setup of the user's Functions.
This could be made as default behavior or as a separate flag.