Question

I'm trying to figure out what the cache key would be for some static assets that I would like to expire.

The file is in my app at /public/file.txt. What could the cache key be for this? I have no way of enumerating the cache keys and I have no idea how to expire that specific asset.

It's driving me insane - unbelievable that there isn't a simple way of enumerating keys, and it's unbelievable that there isn't a simple way of clearing specific cached objects. My site is serving old assets, and the only way I can get over this is to clear my entire cache. How barbaric.

side note to this immense frustration: This sort of all or nothing reminds me of the permanent 301 redirect we are all familiar with in Rails (if you use SSL). I guess if you once decide that your site should be over SSL, you have decided for eternity that your site is over SSL (why a 302 isn't the default is beyond me).

Was it helpful?

Solution

It seems you want to reference this bit of code to determine the key.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top