1
votes

In my TYPO3 6.2.17 installation, I use the tt_news extension 3.6

My articles are located in a folder and are displayed in a default tt_news list element. Usually if I save an article, I need to flush the Frotend Cache. So far so good.However, sometimes I need to display news articles timed, i.e. beginning from a certain date, which I did with the start value in the access tab of the news article. The problem is that the news are not displayed at the required date, until anyone deletes the Frontend Cache, plus after the set date.

What can I do so that the articles are displayed without anyone deleting the Frontend cache manually, after the access start date.

Edit: This Problem cannot be solved just with cron jobs, because it would be to difficult for the content editors to create a cron job for every single news article

2
Possible duplicate of Refresh Typo3 by web server cron jobavarx
This is no duplicate entry, I have already checkd out cron jobs, but they are no possibility (without e.g. a extension which automaticaly creates them)because tt_news is meant to be an area for the content editors, it is not their job to create a cron job for every single news article manualy, I also thaught about flushing the cache automatically at midnight, but it would need to long , until the content appearsSamuel P

2 Answers

1
votes

Disabling caching totally on given page isn't best choice, especially if you have large number of news to render at once and/or large number of visitors, for such cases even relatively short caching is better then no caching at all. The easiest way is shortening cache period of the pages which displays lists and single views by adding only on it shorter period like:

[globalVar = TSFE:id = 123|345]
    config.cache_period = 60
[end]

(where 123 is your list page and 345 is single page UID) Instead using condition you can also just create ext TypoScript templates on these pages.

Keep in mind that period of cache is counted from its create time, so it may happen that some posts will require 2 periods (as first may be just dismissed by time diff) to disappear. If that's absolutely important to you to hide item right now just set the cache_period value to 29 seconds.

Finally if on list/single pages there are elements that also requires extensive rendering (like advanced TMENU's etc) you can cache these additionally with the cache function, it will prevent re-rendering menu between page's cache expirations, anyway you are stil able to force clearing it from BE with yellow flash icon,

pseudo code:

lib.mainMenu = COA
lib.mainMenu {
    stdWrap.cache.key = lib_mainMenu_{page:uid}_{TSFE:sys_language_uid}
    stdWrap.cache.key.insertData = 1
    stdWrap.cache.lifetime = 3600

    10 = HMENU
    10 {
        // ... your menu code
    }
}
0
votes

For clearing the cache through an external trigger see this question, which was asked yesterday: Refresh Typo3 by web server cron job

Alternatively you could exclude the page with the list plugin from caching. Check the behavior tab in the page properties.