[TYPO3-core] RFC: clear cache does not remove files in typo3temp/cache_pages

Dmitry Dulepov 9f4eetb02 at sneakemail.com
Mon Mar 19 10:08:52 CET 2007


Martin Kutschker wrote:
> Dmitry Dulepov schrieb:
>>
>>> But more important, there is a locking mechanism missing. New pages 
>>> could be cached while you're busy deleting the cache directory. Will 
>>> this be a problem or is this handled gracefully as a "cache miss"?
>>
>> Can be. Synchronizing database and file operations would be too hard. 
>> The problem can be solved by swapping file deletion with clearing 
>> cache_pages data.
> 
> Yes? To be honest I have no idea, how the files are retrieved from cache 
> when this setting is in effected. If the DB is never read then your 
> solution (the swap) is ok. If not, it's a bit sloppy without table 
> locking or a file lock or a Sys V semaphore.

There is a function that checks where cache should be stored. It accepts 
record data as parameter. If cache should go to file, function writes 
html field to file and sets it to empty value. On read it reads file to 
that field. So if we first remove files, than clear table, it should be ok.

> Maybe it's worth to add a lockin API that uses System V semaphores with 
> a fallback to file locking (when SysV is not compiled in or not 
> available  - Windows!).

I do not think this is really necessary, though I though about file 
locking too. If we just swap those to activities, it should work.

-- 
Dmitry Dulepov

Web: http://typo3bloke.net/
Skype: callto:liels_bugs

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)


More information about the TYPO3-team-core mailing list