[TYPO3-dev] t3lib_cache

Steffen Kamper steffen at sk-typo3.de
Thu Jan 17 12:25:59 CET 2008


"Ernesto Baschny [cron IT]" <ernst at cron-it.de> schrieb im Newsbeitrag 
news:mailman.1.1200568076.10344.typo3-dev at lists.netfielders.de...
> Steffen Kamper wrote: on 17.01.2008 10:12:
>> Hi,
>>
>> cache is one of the most advanced things in TYPO3 and developers search 
>> for own methods to clear specific cache.
>> What do you think about creating a general cache API?
>>
>> My proposal is to bundle existing functions in one file, eg. t3lib_cache, 
>> maybe mostly static functions that can be called from extensions.
>> API should have functionality like
>> - creating chash from given piVars
>> - deleting cache of specific pid
>> - deleting cache from specific cHash
>> - register cache using fields reg1
>> - deleting cache with registered reg1
>>
>> What do you think? Please let me know you're ideas.
>
> Sounds like a nice idea. The also include a wrapper for getHash and 
> storeHash from t3lib_pageSelect (or move them here and make the wrapper in 
> pageSelect), as these are probably not very known by people needing their 
> own caching.

good! The idea was to move all cache-related functions to this class (if 
possible) and substitute it with wrappers.
Followed by good documentation so devs know how they can proper use them.
Also possible are some usable pi_base-wrappers to allow easy usage (eg 
$this->pi_clearPageCache($pid) )

>
> Maybe at the same time we could enhance that "reg1" integer stuff with 
> some more advanced way of tagging cached pages for later pruning by 
> extensions. Currently it is only an integer, which really doesn't help if 
> every extension want to tag their "single views" using the uid of the 
> record that was rendered. An indexed varchar field would be much nicer.

very good hint. It doesn't makes sense to use an integer (who knows if this 
is a unique). So using varchar is the best way.
So you can use the extkey ore even more advanced tags (eg using keywords 
from pages)

vg Steffen






More information about the TYPO3-dev mailing list