[TYPO3-core] FYI72: #11145: Starttime/endtime is not taken into account when caching

Dmitry Dulepov dmitry.dulepov at gmail.com
Mon May 25 09:31:55 CEST 2009


Hi!

Martin Holtz wrote:
> In function getFirstTimeValueForRecord() could we change 
> list($tableName, $pid) = explode(':', $tableDef);
> to
> list($tableName, $pid) = t3lib_div::explode(':', $tableDef);
> So it would be possible to have an config with spaces in?

We can do that. I made no spaces intentionally in the patch but it can be changed to t3lib_div::trimExplode. No objections.

> config.cache {
>   55 = tt_content: 46, tt_news: 46
> }
> 
> And the function get_cache_timeout() has been executed 4 times in my 
> environment. Which would mean four times the same query. The function was 
> called in the menu rendering process (function makeMenu). So it will depend 
> on menu objects.
> I think we should avoid that. But i do not know how it should be solved.

This is not a purpose of this patch. Please, write another bug report about it to the bug tracker.

> Another thing which does not work as expected is
> $now = 60*(time()/60 - 1);
> it should be
> $now = 60*(intval(time()/60));
> which is not round() but set seconds to 0.
> Otherwise i got the new content a minute to late:)

My version is correct because in my testing I got the page cached until the wrong time. So this extra minute is for safety. I spent nearly three hours doing tests and adjusting the patch.

> Your Solution helps not, if an editor is allowed to put an tt_news-plugin on 
> an new page. You would have to update the configuration with each new page.
> Thats the same with TCEMAIN.clearCacheCmd.

This is how the patch works. If a new tt_news instance is set to the page, the configuration should be updated. This patch neither provides, nor it is possible to make an automatic solution for all cases. Core cannot know that tt_news plugin is responsible for tt_news records.

> But i really like to have both - your patch and patch of francois: 
> 9284-revised.diff 

I am doing only my patch. FOr the other patch, please, look in the other thread.

-- 
Dmitry Dulepov
In the TYPO3 blog: http://dmitry-dulepov.com/article/macintosh-vs-hackintosh.html
LinkedIn: http://www.linkedin.com/in/dmitrydulepov
Twitter: http://twitter.com/dmitryd
Skype: liels_bugs


More information about the TYPO3-team-core mailing list