Tom

Your post reminds me of something I was going to ask for in the 
CF_XMLDatasource tag and the CF_XMLQuery tag... a CACHEDAFTER 
parameter.

I have found the CACHEDAFTER parameter to be very useful to 
cachesystem-wide queries (in a SQL db) that have a low number of 
updates/inserts/deletes, but a comparatively large pattern of 
repeated selects.

An example is a product table in a system that allows online maintenance.

  Any update resets the application variable that stores the 
CACHEDAFTER date/time for
  that table.

  Any read-only (select) references the above application variable

With this technique, over time, you build a system-wide cache of the 
MFU (most-frequently-used) queries.   In many sites this can 
significantly improve performance.  A query in the cache only gets 
purged when:

    any record in the table is updated

    the cache is full and a particular query is the LFU 
(Least-frequently-used) query

The CACHEDWITHIN parameter does not address this particular need.

Since this works for a normal datasource, it should work as well for 
an XML datasource.

Thoughts?

Dick

>
>As for storing this in state, you could use the optional CACHEDWITHIN
>attribute of either the CF_XMLDatasource tag or the CF_XMLQuery tag,
>probably depending on whether you are using a single XML document to store
>all the users settings (you'd cache the query) or a separate document
>for each user (you'd cache the datasource). This attribute works in exactly
>the same way as it does with CFQUERY.
>

-----------------------+
cf-xml mailing list
[EMAIL PROTECTED]
http://torchbox.com/xml

Reply via email to