DDC-3761: Entity Cache Key save bug #4612

Closed
opened 2026-01-22 14:45:56 +01:00 by admin · 5 comments
Owner

Originally created by @doctrinebot on GitHub (Jun 8, 2015).

Originally assigned to: @lcobucci on GitHub.

Jira issue originally created by user Mark.Ragazzo:

When using memcached for caching query or entities, queries will be performed each time, since EntityCacheKey use space in its key. I can submit PR if needed. Let me know if it is needed to be fixed in other places, however i looked through the code and have not found any other places

Originally created by @doctrinebot on GitHub (Jun 8, 2015). Originally assigned to: @lcobucci on GitHub. Jira issue originally created by user Mark.Ragazzo: When using memcached for caching query or entities, queries will be performed each time, since [EntityCacheKey](https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Cache/EntityCacheKey.php#L55) use space in its key. I can submit PR if needed. Let me know if it is needed to be fixed in other places, however i looked through the code and have not found any other places
admin added the BugInvalid labels 2026-01-22 14:45:56 +01:00
admin closed this issue 2026-01-22 14:45:56 +01:00
Author
Owner

@doctrinebot commented on GitHub (Jun 10, 2015):

Comment created by Mark.Ragazzo:

any news on this one? Should i submit PR or is there any internals issues?

@doctrinebot commented on GitHub (Jun 10, 2015): Comment created by Mark.Ragazzo: any news on this one? Should i submit PR or is there any internals issues?
Author
Owner

@doctrinebot commented on GitHub (Jun 10, 2015):

Comment created by @FabioBatSilva:

That seems to be the issue,
Please fell free to send a PR

@doctrinebot commented on GitHub (Jun 10, 2015): Comment created by @FabioBatSilva: That seems to be the issue, Please fell free to send a PR
Author
Owner

@doctrinebot commented on GitHub (Jun 14, 2015):

Comment created by Mark.Ragazzo:

fixed it with simple replacing spaces to dots, in this PR https://github.com/doctrine/doctrine2/pull/1423. We already use this in production with Second Level Cache, however we replaced whole key with md5() for simplicity. Also it may not be question for you but why there is no checks for key length for cache? Since default policy for SCL is to rely on namespaces when generate keys it can easily go out of 250 bytes for memcached, since it invoke a lot of prefixing and so on.

@doctrinebot commented on GitHub (Jun 14, 2015): Comment created by Mark.Ragazzo: fixed it with simple replacing spaces to dots, in this PR https://github.com/doctrine/doctrine2/pull/1423. We already use this in production with Second Level Cache, however we replaced whole key with md5() for simplicity. Also it may not be question for you but why there is no checks for key length for cache? Since default policy for SCL is to rely on namespaces when generate keys it can easily go out of 250 bytes for memcached, since it invoke a lot of prefixing and so on.
Author
Owner

@doctrinebot commented on GitHub (Jun 14, 2015):

Comment created by Mark.Ragazzo:

http://www.doctrine-project.org/jira/browse/DDC-3771

@doctrinebot commented on GitHub (Jun 14, 2015): Comment created by Mark.Ragazzo: http://www.doctrine-project.org/jira/browse/[DDC-3771](http://www.doctrine-project.org/jira/browse/DDC-3771)
Author
Owner

@lcobucci commented on GitHub (Jan 20, 2017):

Closing as invalid since it should be solved on the memcache(d) provider in doctrine/cache.

@lcobucci commented on GitHub (Jan 20, 2017): Closing as `invalid` since it should be solved on the memcache(d) provider in `doctrine/cache`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#4612