[TYPO3-ttnews] better cache management for tt_news
Krystian Szymukowicz
t33kRE.MO.VE. at RE.MO.VE.prolabium.com
Tue May 6 16:31:48 CEST 2008
Hi
I hope someone will be interested.
A month ago on 'dev' I wrote a post about idea of better cache
management for extensions:
http://support.typo3.org/index.php?id=17&tx_nntpreader_pi1[nid]=2&tx_nntpreader_pi1[mid]=333485&cHash=0174821ab9
Today I've just uploaded two extensions - ttnewscache and
ttnewscache_clearlike.
First extension (ttnewscache) builds an array with information which
part of tt_news cached views has become not up to date after latest
tt_news record update/create/delete operation.
Then the array is used by other extension (ttnewscache_clearlike) to
clear proper cache records.
Hook mechanism allows to use the array information by many extensions.
So one extension can delete cache_pages, other can remove statically
generated files if extensions like for example nc_staticfilecache are used.
So how cache is cleared after installing ttnewscache with proper
clearing ext.?
In short:
1. No more clearing cache for ALL single.
2. No more clearing cache for views that can not hold the news.
Extension checks if views match the news categories. If not then cache
are not cleared.
3. Extension checks for changes that have NO impact on cache. For
example: the hidden news was created, the hidden news was updated, the
hidden news was deleted.
4. Extension checks what field have been modified. There are fields
which clear all cached pages of view but there are also fields that
clear only selected pages (see manual for better explanation). Each type
of view (LIST,LATEST) can have its own "clearing" fields and each view
can override this settings. Check TypoScript Examples in documentation.
More information in manuals.
--
grtz
Krystian
More information about the TYPO3-project-tt-news
mailing list