[thelist] CF: Clearing a cached query?
Raymond Camden
jedimaster at macromedia.com
Tue Oct 15 13:48:01 CDT 2002
> > Plenty - if you need an easy way to clear the cache.
> > Yes, you can run the query again w/ 0 timeout, but it's
> > also just as easy to kill the variable using
> > structDelete.
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> just as easy to kill, but more of a pain and memory intensive
> to setup. slapping it in a shared scope means you gotta lock
> the write. you should copy it to a non-shared scope for any
> reads of if later. the read to copy it should be locked.
> now you've got two copies of the same data. naw, that just
> seems like overkill.
Not if you are using MX. Remember, locking is needed about 1% of the
time now.
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > Also - what if the menu is dynamic based on session?
> > Normal query caching may not work well in that case.
> ><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
>
> well, some might say that if the menu is that dynamic then
> maybe it shouldn't be cached at all. after all, each new
> unique instance of the query will become a new cached query.
> since you can only put a finite number of queries in memory,
> you could easily run into problems. or, don't futz with
> caching in this situation and just have alot of database
> reads. you'll probably get better performance by optimizing
> your database and sql, applying indexes wisely, etc. in this case.
Exactly - which is why I would look at other caching solutions then
caching, which was kind of my point. :>
-Ray
More information about the thelist
mailing list