Connecting Tech Pros Worldwide Help | Site Map

caching+file locking

  #1  
Old July 17th, 2005, 01:53 PM
siliconmike
Guest
 
Posts: n/a
I've configured apache to fetch filename.htm if user requests
filename.htm. But if filename.htm does not exist, apache will call
index.php.

Now, index.php will generate a page, buffer it using ob_start and then
save it as filename.htm (thus, effectively filename.htm is cached as
static
file on server hard disk)

Every 10 minutes a cron job deletes filename.htm

So all users requesting filename.htm would be served with the static
version if it exists, otherwise a latest dynamic version created by
index.php.

Any comments about using this type of caching technique..? Any
concurrent read/write problems that anyone foresees?

Mike

  #2  
Old July 17th, 2005, 01:53 PM
R. Rajesh Jeba Anbiah
Guest
 
Posts: n/a

re: caching+file locking


siliconmike wrote:
<snip>[color=blue]
> Any comments about using this type of caching technique..? Any
> concurrent read/write problems that anyone foresees?[/color]

Obviously, locking is the major issue with file based caching
solutions. The workaround is swap file technique--but that will consume
more space.

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to corrupt a MS Access database file in a 'normal' way? shineofleo answers 17 July 21st, 2006 02:05 AM
caching and locking laimis answers 3 November 17th, 2005 03:08 AM
Link tables and file locks Alex answers 4 November 13th, 2005 04:57 AM
MySQL? XML? XML and MySQL? SQLite?! Matthew Bates answers 6 July 17th, 2005 01:13 PM