Connecting Tech Pros Worldwide Help | Site Map

caching+file locking

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 17th, 2005, 12:53 PM
siliconmike
Guest
 
Posts: n/a
Default caching+file locking

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, 12:53 PM
R. Rajesh Jeba Anbiah
Guest
 
Posts: n/a
Default 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/

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,989 network members.