0

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).

Ringo Blancke
  • 2,444
  • 6
  • 30
  • 54

1 Answers1

0

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

daharon
  • 2,000
  • 2
  • 17
  • 20
  • thanks a lot for this link! what would my namespace be ... any idea? I don't set a namespace anywhere in my app or config dirs. – Ringo Blancke Jul 17 '13 at 01:15
  • Namespace is a configuration option: https://github.com/mperham/dalli#installation-and-usage – daharon Jul 17 '13 at 01:18