473,698 Members | 2,528 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Jul 17 '05 #1
1 1342
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
1549
by: Markus Ernst | last post by:
Hi I use PEAR Cache to cache the frontend pages of a content managed web site. Now I update the contents of a page, and of course the updated contents will only be displayed after the expiring period of the cached file. After thinking and googling a lot I see several possible approaches to for handling this, each of which has it's downsides: - Use a very short expiring period. (Downside: Makes caching only relevant
6
1914
by: Matthew Bates | last post by:
Hi, I've been using PHP for a while now and I'm beginning to migrate to PHP5. So far, I'm impressed. I need to develop an admin application to enable users to update a website that is built on a MySQL database. In most cases, I'd simply develop an application to manipulate the database but as the website is updated fairly infrequently, I am considering a number of further options instead to alleviate server load.
9
3290
by: J. Baute | last post by:
I'm caching data in the Application object to speed up certain pages on a website The main reason is that the retrieval of this data takes quite a while (a few seconds) and fetching the same data from the "cache" hardly takes any time A basic pattern used to get the data from disk, or from cache is this data = getDataFromCache("mydata" if data = "" the data = getDataFromDisk( storeDataInCache(data, "mydata" end i
4
6751
by: Alex | last post by:
Is there any way to link a table to a front end for reference only (no requirement to edit data) so that the LDB file is not created. I use a number of tables for reference and do not need to edit them. I read some of the table values. The form that is displayed does not use any of the data in the reference tables. Alex
3
2789
by: laimis | last post by:
For my middle layer objects, I have a base class that other classes subclass. This base class houses properties that all of my objects (with some exceptions) have. Here is the problem. One of the properties the client can configure by 1) setting it himself. 2) accessor can set it up by readign it from the config file. I am caching the value read from the config file using a key set by the
17
4886
by: shineofleo | last post by:
Here is the situation: I wrote a VB programm, which stores all the information in a single Access database file using jet engine. It worked well, however one of my customs reported that there was some problems with this programm. I checked, the log files showed that the database was corrupted. The customer told me that there no 'illegal' operation such as pull out the plug, or kill the programm via task manager... So is there any...
5
4476
by: sethwai | last post by:
Hi, I've read everything I can get my hands on and am still very confused about the similarities and differences between db2_mmap_read/write and concurrent i/o. It seems to me at this point that they are virtually identical except that db2_mmap_read/write applies at an instance level and concurrent i/o can be aplied at a tablespace level. It seems that they both bypass the AIX file cache and eliminate i-node locking. Is this correct?
5
2027
by: brett | last post by:
I read in text files based on the page a user has reqeusted. The files are not larger than 10k. Sometimes I may read in two files for one page but the total read doesn't exceed 15k. However, I'm doing this on ever page load. After reading in the stream, I then do some parsing on each text file and display the content in a Label control. Is there a way to avoid doing the text file read and parsing on every page load? The content is...
3
1975
by: Gary W. Smith | last post by:
I had a couple questions about data caching. We have a site that gets a huge amount of traffic to a few specific pages that have a lot of data on them (300k hits/hour during peak, about 6-10 data calls per page OR 500 SQL calls per second). Most of the data doesn't change more than once ever 10 minutes. Basically they are data islands with specific content. We have already implemented a singleton that manages a connection pool. This...
0
9169
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9030
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8871
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7738
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6528
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5861
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4371
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2335
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.