DDC-533: Cache keys are not limited to word characters #659

Open
opened 2026-01-22 12:45:53 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Apr 21, 2010).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user nicokaiser:

I'm currently working on some glue classes to integrate Doctrine 2 into an existing Zend Framework project.
To be able to re-use our caching classes (which use Zend_Cache), I wrote a \Doctrine\Common\Cache\AbstractCache implementation for Zend_Cache:

http://pastie.org/926891

However Zend_Cache only allows "a-zA-Z0-9_" for cache keys, while Doctrine seems to allow anything, and Doctrine ORM seems to use at lease "" and "$" for metadata storage ("Entity\Article\Category$CLASSMETADATA").

What do you think is the most elegant way to solve this?

  • Should Doctrine also limit the cache key characters?
  • How could *encodeId and *decodeId be implemented?
Originally created by @doctrinebot on GitHub (Apr 21, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user nicokaiser: I'm currently working on some glue classes to integrate Doctrine 2 into an existing Zend Framework project. To be able to re-use our caching classes (which use Zend_Cache), I wrote a \Doctrine\Common\Cache\AbstractCache implementation for Zend_Cache: http://pastie.org/926891 However Zend_Cache only allows "a-zA-Z0-9_" for cache keys, while Doctrine seems to allow anything, and Doctrine ORM seems to use at lease "\" and "$" for metadata storage ("Entity\Article\Category$CLASSMETADATA"). What do you think is the most elegant way to solve this? - Should Doctrine also limit the cache key characters? - How could *encodeId and *decodeId be implemented?
admin added the Bug label 2026-01-22 12:45:53 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#659