[TYPO3-core] RFC: Bug 4581: Duplicate entry on cache_pagesection on reloading twice

Oliver Hader oh at inpublica.de
Thu Jan 25 08:34:55 CET 2007


Hi Michael,

Michael Stucki wrote:
> Ernesto Baschny [cron IT] wrote:
>   
>>> So the data that should be written to the database changes every second.
>>> To simply test this issue, I suggest to set $dbFields['tstamp']=1 and of
>>> course
>>> FE caching should be disabled.
>>>       
>> Now looking at this I wonder why would we want to save to
>> cache_pagesection if we have no_cache turned ON?
>>     
>
> Turning it on seems to help to reproduce the error. However, the error may 
> also occur if all of the following conditions match:
>
> - page X is not in the cache yet
> - client A requests page X, processes it, and finally stores it into the cache
> - client B requests the same page while A didn't write the cache yet
>   

Correct. Due to the no_cache thingy this is IMO reduced to a special
case. I think this is really very ugly if Google comes to the site
another user/spider is visiting at the same time and Google stores some
errors in its search index. But I hope this won't happen so often.
Possibly this case could also be handled by mysql_info, REPLACE or
whatever. Perhaps Karsten could give a suggestion on that.

>> Maybe the solution here is not even save anything to cache_pagesection
>> if we are going to throw it away in 1 second anyway...
>>     
>
> No, but it helps to reduce the chance that this may happen to a minimum. Good 
> idea! So I just finished the attached patch, which seems to work quite well.

I tested the patch without any problems in caching behaviour. Your
description sounds very reasonable. Thanks for the patch!


olly


More information about the TYPO3-team-core mailing list