Hi David,

This is what i did to cache 15 minutes
<cfparam name="bCachePage" default="true">
<cfset request.dtCacheTimeout = DateAdd("n", -15, Now())>
<cfset cacheString = "#cgi.path_info##cgi.query_string#">
.... do some modifications on the cacheString to make it a valid filename ...
<cfif len(cacheString) gt 255>
        <!--- GT 255 chars causes invalid filenames. --->
        <cfset bCachePage = false>
        <cfset request.dtCacheTimeout = Now()>
        <cfset cacheString = "pagenametoolongtocache">
</cfif>

<cfa_generatedContentCache
                bUseCache = "#bCachePage#"
                cacheName = "#cacheString#"
                cacheType = "file"
                cacheDir = "d:\inetpub\wwwroot\corus\cache"
                dtCacheTimeout = "#request.dtCacheTimeout#"
>
....
</cfa_generatedContentCache>


Greets,
Johan

-----Original Message-----
From: David Aden [mailto:[EMAIL PROTECTED]]
Sent: donderdag 8 maart 2001 17:20
To: Spectra-Talk
Subject: generatedcontentCache


According to the documentation and from reading the code, it appears that
cfa_generatedcontentcache.cfm only allows you to set a date for the cache to
expire. I'm using "FILE" type of cache and it compares the dateLastModified
value associated with the cache file with the date in
attributes.dtCacheTimeout which is passed into the cfa_GCC tag.

Is there any plan to allow you to pass in a length of time for the cache to
live. In other words, I'd like to set it so the cache lives for 10 minutes.
In this case, the code would compare the file's dateLastModified to now()
and, if it is greater than attributes.timetolive, (or some such) then it
then refreshes the cache.

It shouldn't be tough code to add to the template, but wanted to see if
anyone else (Ray perhaps! :-) ) has already done it or if such a feature is
coming.

thanks!

David
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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.

Reply via email to