Skip to content

hash long cache keys#24

Closed
Adrian2112 wants to merge 2 commits intomhgbrown:masterfrom
Adrian2112:long_cache_key
Closed

hash long cache keys#24
Adrian2112 wants to merge 2 commits intomhgbrown:masterfrom
Adrian2112:long_cache_key

Conversation

@Adrian2112
Copy link

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

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you constantize this "150" somewhere?

@mhgbrown
Copy link
Owner

mhgbrown commented Jul 9, 2015

Also would appreciate if you could create a test for this

@Daniel-ltw
Copy link
Collaborator

@Adrian2112 could you bump the version for this change?

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

@Adrian2112
Copy link
Author

I just rebased agains master. Does that work?

@Daniel-ltw
Copy link
Collaborator

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.

@jlurena
Copy link
Collaborator

jlurena commented Oct 15, 2024

Closing for #72

@jlurena jlurena closed this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Comments