Well...  what I've been considering is something akin to this:

First, in OO queries, there might be a way to set caching options.  IE:

<cfset myQuery.cacheWithin(createTimeSpan(0,0,1,0)) />

This would cause your OO queries' data to be cached for one hour.

OR:

<cfset myQuery.cacheForever() />

This would cause your OO queries' data to be cached forever.  

These are similar to what's on the cfquery tag already, obviously.  The
thing I don't like is that they don't provide a way to easily cache non-oo
query data.  

It might be possible to do something crazy though... maybe we could "invent"
a new argument (or two) for the cffunction tag.  IE:

<cffunction name="getFoo" cachedWithin="#CreateTimespan#" ..... >

</cffunction>

Now, in theory, because the reactorFactory creates and returns gateway it
could look for methods on the gateway with arguments specified.  And, via
the magic of AOP or method "injection" or something (which I'm not sure I
want to write, but, hey, this is just thinking out loud) we could replace
that method with a method that simply returns cached data when there is
cached data available....  I dunno. There's about a hundred problems with
this idea. 

Lastly, I was thinking about adding caching attributes to the <object> tag
in the configuration.  Something like:

<object name="Foo" cacheMinutes="10" />

This is similar to what transfer does.  This would cause all Foo Records to
be cached for 5 minutes.  I'm not quite sure what this would be based on,
but it would probably be based on the data that's used to load the record.  

All in all, it needs a lot more thought.... and I'd like to know what the
reactor community is interested in, if anything.

Doug

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Barry Beattie
Sent: Monday, October 09, 2006 9:09 AM
To: [email protected]
Subject: Re: [Reactor for CF] Big speed update in latest commit

> I am, however, considering caching options as it related to both queries
and
> records.  I'm not quite sure how this would work yet though.

Doug, please forgive my 2 cents but while caching SQL/DML makes
perfect sence (not too far removed from execution plans, methinks)
going the extra step with cached data and knowing when it's dirty if
more than one application can access the same database has done my
head in far too many times. Client-server app with an alternative web
front end; 2 applications accessing the same database; even legacy Vs
new code, etc.

just a quick thought, nothing more.

cheers
barry.b


-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --



-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --

Reply via email to