Sr. Web Developer
mediabistro.com
US-NY-New York

Justtechjobs.com Post A Job | Post A Resume

Another Look At "Building Your Website With Cached Dynamic Modules"
Manual Cache File Naming
I used a template to generate cache files on the fly, and this was based on dates and times. The cache's filename is generated on the value's being passed, but some filesystems do not allow colons that would be found in a time format. I realized I needed to allow the developer to name the cache file manually if desired.
<my-style name="time now" time="12:32:00" cache_name="onTheAir">
Originally, this tag would have produced a cache file with a name such as, 'style_name=time now_time=12:32:00'. Now, this module would produce a cache file with the simpler (valid) name: 'style_onTheAir'
'On The Hour' Cache Updating
JP's system allowed the developer to set the expires delay for a cache file. For example, if the expires delay was set to 3600 seconds, the cache file would be regenerated subsequent to the next hit after 3600 seconds have elapsed since the creation of the cache file.
My site needed to work a little differently. I needed the ability to automatically have the module refresh at specific intervals, such as, on the hour, or on the quarter-hour, or on the half-hour, etc. So I went ahead and added some functions to perform these evaluations and return whether the module was due to be updated or not.
<my-style name=test refresh='HALFHOUR'>
(this cache file updates itself every half-hour)
The available arguments for the refresh variable are:
MINUTE, QUARTERHOUR, HALFHOUR, HOUR, HALFDAY, DAY, MONTH
[ Next Page ]

[Page 1]  [Page 2]  


Comments:
it tells me i don't have Sex Beplaced Ru 12/07/04 09:24
RE: Lockingjoseph 01/31/02 08:22
LockingLennie05/18/01 12:50
information about dynamic&ststic websitesrizwanpisces02/14/01 10:53
 

If you are looking for help, please post on the appropriate forum here. Your questions will be answered much more quickly.

Add A Comment:

Name:

Email:

Subject:

Message:

To reduce spam posts, messages are now manually approved

You are not [logged in]. That means your account will not get credit for this post.