On Sun, 9 May 2004, Nuno Lopes wrote: > Hello, > > Yesterday I was thinking in implementing some kind of permanent caching for > livedocs, instead of deleting all cached files when build.sh is run. > Then I've checked that the tables files has a mtime colum. Maybe this was > your original idea! > > As this could boost significantly livedocs' performance, I think we could > discuss how to implement this feature. > I've thougt in two ways: > * having in all cached files a code like: > <?php > if (outdated()) > parse_file_again(); > ?> > > With this method, we would check every time a file is accessed if it updated > or not.
That's a bad idea is it requires a php interpreter to read the file and execute it. The idea was to make it cacheable (by a reverse proxy like squid) so it HAS to be static HTML. > > Second method: > * When building, we could have a script that would check each file for > changes and delete them if they are outdated. (we must delete all files if > there were changes in one of the entities files, as it would be hard to > track if that page uses the modified entity or not - and would take too many > time). > > > Any opinions/sugestions/ideas?? Checking if files are outdated takes more time (and diskio) then regenerating them on the fly, so that's why I made it delete everything. regards, Derick
