Old assets availability with `--old-asset-ttl`
I'm trying to make outdated assets from the previous deployment available using
--old-asset-ttl
option (Thanks for @Peter Belbin https://github.com/cloudflare/workers-sdk/pull/3384).
Unfortunately, assets aren't available using the old link from the browser after deployment. They are still in KV as expected but are not present in __STATIC_CONTENT_MANIFEST
anymore. So can't be reached from browser by initial name (without hash prefix).
I'm using a custom build with webpack to build my React app (not Wrangler internal bundler)
and npx wrangler deploy -c wrangler.toml -e "<MY_ENV>" --old-asset-ttl=43200
to deploy.
And finally, my fetch
func in Worker is very simple
What I'm missing in using --old-asset-ttl
? How to make it work?2 Replies
Hmmmmmmm. I think this could be considered a bug. Seems like, for your use case, the manifest should be including the not-yet-expired asset details so that the mapping can be successful until they expire.
I got it. Thanks for taking a look!