[TYPO3-dev] Seperate (clearable) cache for frontend plugins

Peter Klein pmk at io.dk
Sun Nov 15 22:00:12 CET 2009


Hi Thomas.

you can manually clear the cache for the pages where your plugin is 
inserted, whenever a user have updated data, like this (which is exactly the 
same thing that happens when you clears the pagecache from the BE):

$GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_pages','page_id IN 
('.implode(',',$GLOBALS['TYPO3_DB']->cleanIntArray($list_cache)).')');
$GLOBALS['TYPO3_DB']->exec_DELETEquery('cache_pagesection', 'page_id IN 
('.implode(',',$GLOBALS['TYPO3_DB']->cleanIntArray($list_cache)).')');

var $list_cache is an array of page ids.

--
Peter Klein


"Thomas "Thasmo" Deinhamer" <thasmo at gmail.com> wrote in message 
news:mailman.1.1258293724.28487.typo3-dev at lists.typo3.org...
> Hello!
>
> I read thru some cache-related topics, articles etc.
> which described some caching technics using COA_INT,
> and a weird combination of typoscript objects, nested
> within each other.
>
> I got a frontend plugin which renders some sort if
> statistics data in form of a simple text. Users can
> contribute data, on which the statistics data is based on.
>
> Think of two actions which are defined inside the plugin:
> 1. Display the statistics data
> 2. Contribute data
>
> The calculation of the statistics data is very expensive,
> which forces me to cache the frontend plugin, otherwise the
> it would just take to long to render it (or the page).
>
> The bad thing about the caching is, that after contributing
> some data, the statistics display won't get updated, until
> I clear the page cache in the backend.
>
> The magic question is now:
>
> Is it possible to clear the cache of the frontend plugin only,
> without touching the page cache at all?
>
> If this is possible I would only clear the cache of the plugin
> after new data was contributed by a user. This way, the display
> of the statistics will always be up to date, wihtout forcing
> the frontend plugin to be a USER_INT.
>
> Does anybody have an idea or a solution?
>
> Thanks a lot,
> Thasmo 






More information about the TYPO3-dev mailing list