[Typo3] Caching issue for certain content types

Darryl Krause darrylk at ywam.no
Thu May 19 10:34:30 CEST 2005


Hi all

Just posting a copy of this off-line response so it ends up in the archives. 
Any other suggestions welcome!				


On 18 May 2005 Ben O'Hear <ben at revelate.com.es> wrote:
> Sorry to bother you, but I noticed on the Typo3 mailing list that you had a
> problem I am having at the moment (and is driving me nuts). Since no one
> answered I wondered if you ever found a solution. The problem is (to quote
> you :-):
> 
> If I insert a "Menu/sitemap" element to show the contents or sub-pages of
> some other page it is not updated if changes are made to the other pages.

Hi Ben,

I had actually forgotten about that problem with nav elements. One 
solution is to just keep clearing the cache often enough when doing 
changes in the Back End. (Not very reliable)

Another solution (not actually tried for this purpose) would be to use 
the "clearCacheCmd" which I read about in the lastest tt_news 
manual (and have used successfully with tt_news).

When you make changes to any of the records of a page the cache 
for that page is cleared. By adding the following code to the TSconfig 
field of the page header will also allow you to clear the cache of other 
pages at the same time. So put this in all of the pages that are 
included in the navigation element (menu) and add the id of the page 
that has the navigation element in it.

TSconfig
=====
## clears cache for other pages when edited or cache cleared
TCEMAIN.clearCacheCmd = 21,152,202
=====
Note: "21,152,202" are just examples. Use a comma seperated list 
og pid values.

Of course this means lots of code in various TSconfig fields so it is 
not a good solution. I would not recommend this for a whole sitemap. 
Then it would probably be bettter to just set the page as non-cached.

Hope this helps
-Darryl


On 5 Feb 2004 Darryl Krause <darrylk at ywam.no> wrote:
> Hi all!
> 
> My site is basically working correctly but I have a couple of unresolved issues
> relating to caching of certain cantent types...
> 
> 1. Menu/sitemap
> 
> If I insert a "Menu/sitemap" element to show the contents or sub-pages of some
> other page it is not updated if changes are made to the other pages.
> 
> Obviously I can always clear cache after making changes but my editors don't
> always remember to do this nor do I. It is also possible to set the whole page 
> as "no cache", but that seems unnecessary since all the other content on the 
> page can be cached, it is only the menu item that should be "no cache". 
> I have searched through the documentation and tried various things but 
> have not found a satisfactory solution to this.
> 
> 2. Insert records
> 
> I have a similar problem with the "Insert Records" content element. If I insert
> records say for example from tt_address, the displaying of the inserted 
> records remains unchanged even if I make changes to the original 
> tt_address record. So I either need  to remember to clear cache on such 
> pages, or set the whole page as "no cache".
> 
> It would be nice if there was a way to globaly set all "Insert Record" elements
> to be non-cached. Or even better, if making changes in a record somehow 
> automatically > cleared cache for any related "Insert Record" content 
> elements.
> 
> Any help on these issues would be appreciated!
> 
> Thanks
> -Darryl


-----------------------
This thread is located in the archive at this URL:
http://typo3.org/documentation/mailing-lists/english-main-list-archive/thread/36637/
 



More information about the TYPO3-english mailing list