Mike's Pub -> Discussion Corner -> Questions on Web Programming (Perl/PHP)

 Caching postnuke (or similar) [ Reply ] [ Back to Index ] Top Bottom

Author: iWindsurf.co.uk
Date: 2003/10/12 18:52

I can see that these pages are a bit dated now but thought I'd share with you my little
bit....
I have altered the code in many of my postnuke blocks to cache their output to .txt files
then next time they are called the code compares filemtime() of the cache to fileatime()
of any relevant scripts which would update the block.....  Thereby the cache is replaced
whenever someone uses the update script.  
I am no programmer however and I wonder whether asking the script to check these times
takes as long as using the database ???

regards, Bert

 Re: Caching postnuke (or similar) [ Reply ] [ Back to Index ] Top Bottom

Author : Mike
Date: 2003/10/28 22:36

Difficult to say - when you already have an open database connection and that information
is cached, then it may be faster via the database than using file*time() on some slow file
system.

But in most cases, the file*time() should still beat the database query...

 Reply [ Back to Index ] Top Bottom
Name : or OpenID OpenID Login
E-mail : (optional)
Subject :
Message :
MathGuard security question: 0 + 0 =
 

Mike's Pub -> Discussion Corner -> Questions on Web Programming (Perl/PHP)