-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[DDC-3761] Fixed cache key #1424
Conversation
Hello, thank you for creating this pull request. I have automatically opened an issue http://www.doctrine-project.org/jira/browse/DDC-3771 We use Jira to track the state of pull requests and the versions they got |
@Ragazzo makes sense to me, however I do want @FabioBatSilva to review it too. |
@guilhermeblanco he reviewed it in Jira task, and said that it is an issue, sure it would be great if he will see this one more time |
Looks good to me, Wondering if we should give up the more readable serialization format here and just hash |
@FabioBatSilva note that you can easily go out of the limit for key, if |
@Ragazzo : That sounds like a job for individual Hmm... if you're worried about unexpected truncation, I'd make sure that the "most unique" parts of the ID are expressed at the start of the generated key-string. That way you reduce the chances of collision when part of the end gets chopped off. |
@DHager yes, it is question of cache implementations in particular, just raised this question to avoid unnecessary bugs in future |
I agree with @DHager here: the interface says |
@Ocramius so you want to do this replace in |
@Ragazzo the fix fixes the symptom, not the cause, heh |
@Ocramius sure, but i dont think that replacing in memcached or other providers sounds right, if you will use or store the hash of entity key anywhere and then will try to get it without calling providers, maybe by your own implementation you can get in situation that you forgot to replace spaces like it would be done in provider. Anyway, why this situations does not have checks in cache providers, like max key length, spaces, and so on? Should separated issue be open for that to make research on what characters are valid and what not? |
It is indeed a bug in the cache provider, or in the specific cache adapter impl.
I think so, yes |
Ok, than what is on this PR, should i close it and open separate about memcached cache provider implementation? |
@Ragazzo yes please, and thanks! :-) |
Also: close after opening the other PR, or we'll lose track of it |
Ok |
@Ocramius i'll try to get back to this one asap on weekend, let me know if i should speed up or if it will take too long feel free to fix it as was described ) |
I've opened doctrine/cache#208 to keep track of this issue, so we can close this PR. |
Related with this one