I am presuming this flushes out the entires cache - given that it is a
shared cache on ISP may not be the best solution? (although ideal for what I
want to do)

_______________________________________________________
*  Regards, 
                Richard Lovelock 
Westminster City Council - Web Support
Cap Gemini Ernst & Young
Southbank
95 Wandsworth Road
London 
SW8 2HG 
(     0870 906 7482
 
_______________________________________________________


-----Original Message-----
From: Kola Oyedeji [mailto:[EMAIL PROTECTED]
Sent: 27 October 2003 14:22
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] Clearing cached queries


Ok

Something to be aware of, your queries must be exactly the same, name,
datasource, everything down to whitespace IIRC.

If this is not the case cf will not recognize it as the same query.

One alternative that we have found to work quite well is to use the
undocumented (in CF5) tag <cfobjectcache action="clear">

You can set up your application so that this tag can be executed based
on a link in the admin section or something tacked to the url. You could
place the check for the toggle in the application.cfm or (fbx_settings
if using fusebox)

HTH

Kokla

>> -----Original Message-----
>> From: Lovelock, Richard J [mailto:[EMAIL PROTECTED]
>> Sent: 27 October 2003 14:02
>> To: '[EMAIL PROTECTED]'
>> Subject: RE: [ cf-dev ] Clearing cached queries
>> 
>> Ok i don't think i made myself clear enough...
>> 
>> i'll break it down....
>> 
>> i have some pages with cached queries but when i update the DB my
pages
>> are
>> not showing the new data because the results are cached.
>> 
>> To get around this I have been editing all my createtimespan(5,0,0,0)
to
>> createtimespan(0,0,0,0) then uploading all of them and surfing to
them
>> and
>> the pages refresh - magic. Then rechanging all the code to
>> #CreateTimeSpan(5,0,0,0)# so that the queries are pulled from cache
again
>> (noticeable performance increase)
>> 
>> However this is a bit of a chore, so.......
>> 
>> I have taken all of the cached queries from the various pages and put
>> them
>> all on to a single page (i.e. clearcache.cfm) but changed all of the
>> createtimespan(5,0,0,0) to (0,0,0,0). The idea is that after I do all
the
>> DB
>> updates I can just run this one page to clear all the cached queries.
>> 
>> the page runs ok - and dumping the query results shows that (as you
>> suggest
>> Rich) the result set is refreshed..wonderful
>> 
>> Then, I go back to my 'proper pages' with the original queries in
with
>> their
>> createtimespan(5,0,0,0) in hoping that the cache would be cleared and
it
>> would have to rerun the query now and get fresh results but it
doesn't
>> happen and it still appears to bring back cached results - which
brings
>> me
>> to the question I asked:
>> 
>> - does #CreateTimeSpan(0,0,0,0)# (used with cachedwithin) clear any
>> cached
>> results from cache where all the SQL matches (what I hoped)
>> 
>> OR
>> 
>> - does it retrieve a fresh set of results this one time but still
leave
>> the
>> cached result set in the cache so if you then use
>> #CreateTimeSpan(5,0,0,0)#
>> it pulls back the old cached results??
>> 
>> (I hope that is clearer)
>> 
>> _______________________________________________________
>> *  Regards,
>>                 Richard Lovelock
>> Westminster City Council - Web Support
>> Cap Gemini Ernst & Young
>> Southbank
>> 95 Wandsworth Road
>> London
>> SW8 2HG
>> (     0870 906 7482
>> 
>> _______________________________________________________
>> 
>> 
>> -----Original Message-----
>> From: Rich Wild [mailto:[EMAIL PROTECTED]
>> Sent: 27 October 2003 13:50
>> To: '[EMAIL PROTECTED]'
>> Subject: RE: [ cf-dev ] Clearing cached queries
>> 
>> 
>> #createtimespan(0,0,0,0)# will refresh a query that is currently
cached
>> and
>> has the same name and query statement.
>> 
>> > -----Original Message-----
>> > From: Lovelock, Richard J [mailto:[EMAIL PROTECTED]
>> > Sent: 27 October 2003 13:46
>> > To: 'cflist'
>> > Subject: [ cf-dev ] Clearing cached queries
>> >
>> >
>> > Does #CreateTimeSpan(0,0,0,0)# clear any identical cached
>> > versions of the query from the cache OR does it retreive the
>> > results fresh for this instance of the query but still leave
>> > the cached version in the cache - i.e. so if another page
>> > used the same query but with #CreateTimeSpan(5,0,0,0)# it
>> > would pick up a cached version even though the query has been
>> > run from a different page with #CreateTimeSpan(0,0,0,0)#  ??
>> >
>> > I hope I have made that clear enough
>> >
>> >
_______________________________________________________<?xml:namespace
>> > prefix = o ns = "urn:schemas-microsoft-com:office:office" />
>> >
>> > *  Regards,
>> >                 Richard Lovelock
>> >
>> > Westminster City Council - Web Support
>> > Cap Gemini Ernst & Young
>> > Southbank
>> > 95 Wandsworth Road
>> > London
>> > SW8 2HG
>> >
>> > (     0870 906 7482
>> >
>> > _______________________________________________________
>> >
>> >
>> >
>> >
>> > =======================================================
>> > This message contains information that may be privileged or
>> > confidential and is the property of the Cap Gemini Ernst &
>> > Young Group. It is intended only for the person to whom it is
>> > addressed. If you are not the intended recipient, youare not
>> > authorized to read, print, retain, copy, disseminate,
>> > distribute, or use this message or any part thereof. If you
>> > receive this message in error, please notify the sender
>> > immediately and delete all copies of this message.
>> > =======================================================
>> >
>> >
>> 
>> 
>> --
>> ** Archive:
http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>> 
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> For human help, e-mail: [EMAIL PROTECTED]
>> 
>> 
>> =======================================================
>> This message contains information that may be privileged or
confidential
>> and is the property of the Cap Gemini Ernst & Young Group. It is
intended
>> only for the person to whom it is addressed. If you are not the
intended
>> recipient, youare not authorized to read, print, retain, copy,
>> disseminate, distribute, or use this message or any part thereof. If
you
>> receive this message in error, please notify the sender immediately
and
>> delete all copies of this message.
>> =======================================================
>> 
>> 
>> --
>> ** Archive:
http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/
>> 
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> For human help, e-mail: [EMAIL PROTECTED]


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]


=======================================================
This message contains information that may be privileged or confidential and is the 
property of the Cap Gemini Ernst & Young Group. It is intended only for the person to 
whom it is addressed. If you are not the intended recipient, youare not authorized to 
read, print, retain, copy, disseminate, distribute, or use this message or any part 
thereof. If you receive this message in error, please notify the sender immediately 
and delete all copies of this message.
=======================================================


-- 
** Archive: http://www.mail-archive.com/dev%40lists.cfdeveloper.co.uk/

To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
For human help, e-mail: [EMAIL PROTECTED]

Reply via email to