Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shorten cache key lengths using md5 #34

Closed
wants to merge 1 commit into from

Conversation

brycedrennan
Copy link

Some cache backends, like memcache, can't have keys longer than 250 characters.

Resolves issue #31

Some cache backends, like memcache, can't have keys longer than 250 characters.
@srenault
Copy link
Contributor

srenault commented Nov 7, 2017

Hey @brycedrennan.
First, thanks for you PR.
About this, I doubt it's the good place to do it.
Why don't you do it in your cache implementation level?
Because as you said, it's specific for each cache backends.
Having hashed keys is hard to debug when inspecting keys.

@brycedrennan
Copy link
Author

I agree philosophically that the cache implementation should handle this.

More pragmatically though, handling it in the library makes the library just work out of box. The vanilla cache implementations out there don't handle this key shortening (including the one mentioned in the docs). Otherwise what happens is someone sets up prismic and everything works great until one day a key is too long and things break. It's unexpected.

Is there any downside to using more compatible keys?

@brycedrennan
Copy link
Author

Will this be merged or should I close the PR?

@brycedrennan
Copy link
Author

Closing due to lack of response.

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.

2 participants