Bug #27135
closed
Make Cache Framework namespace aware
Added by Sebastian Kurfuerst over 13 years ago.
Updated over 13 years ago.
Description
Just tried out how the Extbase object container manages namespaced classes.
Result: It does very well.
But a constant inside the interface t3lib_cache_frontend_Frontend has to be changed from
const PATTERN_ENTRYIDENTIFIER = '/^[a-zA-Z0-9_%\-&\]{1,250}$/';
to
const PATTERN_ENTRYIDENTIFIER = '/^[a-zA-Z0-9_%\-&\\\]{1,250}$/';
to support also backslashes inside a cache entry identifier.
The simple solution is to just sha1() the identifier: This way make the identifier fit in size and it will validate with current regex.
If we still want this change, this should be pushed to FLOW3 first, and some backends like the file backend bust be checked if they accept the backslash.
I like the sha1-solution. Makes it a bit harder to track down things, but gives more flexibility. The DB-backend is currently "restricted" to 250 chars for the identifier only. When using namespaces and the like I guess we might reach that limit pretty quickly in some cases. May be the same for other backends.
- Status changed from New to Rejected
Rejected.
We will probably not allow \ as valid identifier char. This would raise too many problems in different backends (like file backend) and the identifier is not meant to be use like that. Just sha1() or something your identifier and the issue is solved. Furthermore a patch like that should go to FLOW3 and I doubt that Robert would accept it (for the same reasons).
#25337 is not really related to this issue here, and I now removed the relation again.
Also available in: Atom
PDF