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

Ernesto Baschny [cron IT] ernst at cron-it.de
Thu Oct 9 13:54:20 CEST 2008


Ingo Renner wrote: on 08.10.2008 12:32:

>> On 08.10.2008, at 11:01, Ingo Renner wrote:
>>> an interface without methods doesn't make a lot of sense to me...
>>
>> http://en.wikipedia.org/wiki/Marker_interface_pattern
> 
> ok, thanks for the hint. Nevertheless it doesn't make sense in this
> situation. We can only test for an interface after we have an instance,
> but we want to know this before instantiation in this case

Not needed, because we always need at least one instance, even for
singletons. So:

1) singleton for the class already there? return it right away
2) no singleton there?
  a) make instance
  b) check if interface is implemented
  c) if it is a singleton implementation, store it away "somewhere"
(static var, for example), which will be found on next hit in step 1).

Cheers,
Ernesto


More information about the TYPO3-team-core mailing list