[TYPO3-50-general] Cache problem in Extbase with reflection data
Steffen Kamper
info at sk-typo3.de
Tue Aug 4 13:09:21 CEST 2009
Hi Robert,
first thx for the detailed explanations.
Robert Lemke schrieb:
>
> Without looking at the Extbase implementation ... here's how it basically
> work in FLOW3:
>
> - on each request the reflection framework checks (very early) if cached
> data is available
>
> - if yes: load reflection data (about all classes) from cache
> - if not: reflect all classes which are _currently declared_
>
> - each time the reflection service's methods are called they check if
> the class in question has been reflected already
>
> - if yes: use the cached information already loaded earlier
> - if not: reflect the new class and return the information
>
> - at the end of each request the reflection framework checks if any new
> classes have been reflected since the data has been loaded from cache
>
> - if yes: save the new reflection data (ie. everything again)
> - if not: nothing to do
>
this looks like the same in Extbase
> - the overall reflection data cache entry is only flushed if "something
> radical" happens
>
> - if a single class file changes, this is detected by the file monitor
> which flushes all cache entries tagged with the class name
>
we don't habe a file monitor, but the cache is bind to the clear cache,
so clearing isn't a problem.
Also i don't see any tags in FLOW3, using tags would be a call like
$this->cache->set($identifier, $data, $tags)
> - on the next run the reflection service detects which classes have
> changed
> and therefore need to be re-reflected. By this we avoid reflecting all
> classes again only because a few have changed.
>
and this might be different.
comparing both files Service.php i detected some differences.
In Extbase there is no injection, also the initialize does some more:
if ($this->detectClassChanges === TRUE) {
$this->forgetChangedClasses();
}
$this->reflectEmergedClasses($classNamesToReflect);
these parts are missing in Extbase, also the collected data saved to
cache is smaller than in FLOW3.
While debugging the service class i saw that it doesn't contain the data
of extbase, looks like a small reflection of the plugins classes. So it
doesn't wonder if a class isn't found in this data.
vg Steffen
More information about the TYPO3-project-5_0-general
mailing list