Honestly, you really ought not to care.  I'd say it's safe to assume
that MM made it operate as quickly and efficiently as possible.  If
the functionality the built-in cache uses is sufficient for your
needs, it's very likely it'll be faster than anything you can build in
CFML (simply because the built-in stuff is written directly in Java). 
If the functionality isn't sufficient, then you have to write your
own.

CF provides no means to check the sizes of in-memory objects (and I
don't thinkg Java does either - except perhaps via JVM monitoring
tools), so it's pretty unlikely that you'll be able to do that either
way.

Since queries are cached based on exact SQL matching, I'd consider it
a safe wager that the cache does something like this:

function runCachedQuery(sql) {
  var key = hash(sql);
  if (! queryCache.has(key)) {
    queryCache.put(key, runQuery(sql));
  }
  return queryCache.get(key);
}

cheers,
barneyb

On 12/7/05, Terry Ford <[EMAIL PROTECTED]> wrote:
> Has anyone found a way to get access to the underlying java object(s) that 
> CFMX uses for query caching?
>
> It would be nice to be able to see precisely (a) how many queries have been 
> cached and (b) how much memory each one is using at any point in time.  
> Additionally, it would be nice to know precisely how the access times for a 
> query scales as the number of cached queries increase (a hash?), and how 
> those access times compare to self-caching in arrays or structs.
>
> Regards,
> Terry
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:226511
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to