mhgbrown / cached_resource

Caching for ActiveResource
MIT License
80 stars 28 forks source link

hash long cache keys #24

Open Adrian2112 opened 9 years ago

Adrian2112 commented 9 years ago

Some cache stores have a size limit for the keys. E.g ActiveSupport::Cache::FileStore So in case there are a lot of parameters and the cache key is too long we hash it

mhgbrown commented 9 years ago

Also would appreciate if you could create a test for this

Daniel-ltw commented 8 years ago

@Adrian2112 could you bump the version for this change?

travis.yml have been updated and we should re-run your test.

Adrian2112 commented 8 years ago

I just rebased agains master. Does that work?

Daniel-ltw commented 8 years ago

Could this be optional?

Setup a configuration variable for it. Only hash if the configuration is set to true and could probably default to true on ActiveSupport::Cache::FileStore?

Just wondering the use case and would everyone want to have hashed keys.