By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,409 Members | 1,604 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,409 IT Pros & Developers. It's quick & easy.

caching+file locking

P: 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

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
siliconmike wrote:
<snip>
Any comments about using this type of caching technique..? Any
concurrent read/write problems that anyone foresees?


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/

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.