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

Martin Kutschker martin.kutschker-n0spam at no5pam-blackbox.net
Fri Mar 16 17:20:03 CET 2007


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.

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!).

>> PS: Will the cache-file be deleted when I clear the cache of an 
>> individual page?
> 
> Currently no. The reason is that the code for clearing single page cache 
> is quite complex. It looks for related pages and clears them as well. I 
> though I will make a second patch for it. Otherwise the change will be 
> too large for a single commit.

No problem and a good reason.

Masi



More information about the TYPO3-team-core mailing list