[TYPO3-v4] What is happening with id 0?

Ernesto Baschny [cron IT] ernst at cron-it.de
Fri Sep 10 08:21:21 CEST 2010


Steffen Kamper schrieb am 09.09.2010 23:00:

>>> the 'frontend' => 't3lib_cache_frontend_StringFrontend' doesn't work,
>>> is defect or unusable
>>
>> Uhm, no. The StringFrontend is made for storing strings, not variables,
>> thus no arrays can be stored.
>>
>> But TYPO3 stores the cached data as an array:
>>
>> if (TYPO3_UseCachingFramework) {
>>     $cacheData = array(
>> ...
>> $this->pageCache->set(
>>     $this->newHash,
>>     $cacheData,
>> ...
>>
>> So yes, you cannot use the StringFrontend for the "standard" TYPO3
>> caches, but besides that it works perfectly for other cases. :)

> yes, it makes sense. Anyway it's a "valid" configuration, and if it's
> not usable i would expect an exception "StringCache cannot be used for
> storing arrays. Please change your frontend setting." (Ingmar, if you
> have a good wording, please quote it)
> 
> btw - i got this setting from Christian to test compressed cache, so i
> expected this is a valid config.

Christian corrected his test-setup after the release of 4.5alpha1, and
we noted that in the release notes [1] on the wiki.

[1] http://forge.typo3.org/projects/typo3v45-projects/wiki/TYPO3_450alpha1

In NEWS.txt it was still wrong, I thought Christian had fixed it. I did
it, now (rev 8774).

> Just a sidenote: i also would expect that the cache is little more
> intelligent. If data !== string, then serialize it, that's what i would do.

That is what "VariableCache" is there for, so if you need it, you use
that instead.

In rev. 8557 [2] Christian made the frontend caches configurable in
config_default, and this is probably the reason why they hadn't been
configurable before: Because they need to be VariableCache. :) As soon
as they get "configurable", you start having this kind of situation
where people configure it with something that is not meant to be. It
should then at least be documented besides that configuration item.

Cheers,
Ernesto

[2]
http://forge.typo3.org/projects/typo3v4-core/repository/revisions/8557/diff


More information about the TYPO3-project-v4 mailing list