[TYPO3-core] RFC #9505: Make the caches in TYPO3 use the new caching framework

Xavier Perseguers typo3 at perseguers.ch
Tue Oct 7 22:32:36 CEST 2008


>> I know that the 5.0 team doesn't like singletons but I would 
>> appreciate if we could avoid new globals if possible. Actually I have 
>> no idea if there must be only one copy of the cache manager around, so 
>> maybe I'm on a wrong track here.
> 
> at least only one is needed, so I'd be fine with a singleton, too. But 
> to achieve this t3lib_div::makeInstance() must be made aware of singletons.
> How about a simple check whether the class has a method named 
> getInstance(), if that is the case it is used instead of the new operator?

+1 for this idea. It would prevent part of my own code in personal (not 
yet released) extensions.

-- 
Xavier Perseguers
http://xavier.perseguers.ch/en


More information about the TYPO3-team-core mailing list