Wait a minute...
ColdFusion provides this sort of caching in <cfquery> as well through the
cacheAfter attribute.
As for usages, let's see... This way of caching makes allows for both cache
for a period of time or until a period of time, while using the cachedwithin
attribute only allows caching for a period of time. For example, let's say
we want a page cached until the content is updated. Since we have no idea
how when the content will be updated I can't use cachewithin, instead I can
accomplish this by driving the dtCacheAfter attribute to the last time the
content changed. So if I change the content (pretend 8/7/01 01:00:00) and
cache a page with the dtCacheAfter set to the last time the content changed
it will rebuild the cache and give it a dt (pretend 8/7/01 04:00:00). Each
request will look to see if the page cache was created after the content was
created. 8/7/01 04:00:00 > 8/7/01 01:00:00. Now let's say three days later
the content changes so the datetime on the content is 8/10/01 01:00:00. The
next time the page is requested it will check to see if the page cache was
created after the last time the content was created. Now it isn't so it
would refresh 8/7/01 04:00:00 < 8/10/01 01:00:00
That is a reason.
Ben Elmore
Spectra Product Evangelist
-----Original Message-----
From: Aaron Shurmer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 07, 2001 3:00 AM
To: Spectra-Talk
Subject: RE: Caching
I couldn't possibly comment on why spectra caching was designed this way. It
would be nicer if it was in the same methodology as <cfquery> cachedwithin
is done. In fact, the documentation on the cache timeout is so confusing
that I had to read the code to work out how it works...
cheers,
Aaron.
/****************************************
Aaron Shurmer
Senior Developer
Daemon Internet Consultants
ph +61 (0) 2 9380 4162
http://www.daemon.com.au/
engineered.innovation
****************************************/
-----Original Message-----
From: Nathan Wheat [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 7 August 2001 12:31 PM
To: Spectra-Talk
Subject: RE: Caching
What would be reasoning behind such a whacked method? Surely developers
will always know how long the cache is to live for (ie, 30mins), rather than
this expiry timestamp thing... From a useability point of view, specifying
the timeout period is much easier. Functionally, whether the conversion
function is insde or outside of the tag should be of little consequence.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/spectra_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.