Farrah,

Ok - well you are going from no caching to caching for 2 days?   Keep this
in mind.  If you have a page that is served 50 times a minute and you cache
for just one minute - you have gone from 3500 queries an hour to a mere 60.
Even a little moderate caching can have benefits. Why don't you try caching
for a 10 minutes (a max of 6 queries an hour) use a URL.Refresh parameter to
allow the user immediate access to the query data - like below:

<cfquery name="x" datasource="y">

        ...your regular query code

<cfif IsDefined('url.refresh')>
        <cfset bogusVar = randrange(1,10000)>
        AND #bogusVar# = #bogusVar#
</cfif>

</cfquery>


When the client types in the URL with "refresh=true" they can see the update
to the page - and they will know that will be there for everyone inside of
10 minutes.

-Mark



-----Original Message-----
From: FARRAH NG [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 13, 2002 3:34 PM
To: CF-Talk
Subject: cached query


hi all,
i have built a website for a client where the home page is totally
dynamics ( the cfm file has almost 10 queries accessing 10 different
tables in order to populate the page).  Now the client is complaining
about the slow load time.  they told me they don't need to have the
home page accessing the database everytime the page is loaded since a
lot of the info in the page is not changed that frequently.  I am
thinking of using the CACHEDWITHIN with some of the CFQUERY in the
page, like CACHEDWITHIN 2 days.  What i am worrying about is if the
client update the data within those 2 days, the home page will not
be able to display the lastest info.  Is there a way to refresh all
the cached query once the client update the database, so all the
cached queries will also be updated instantly without waiting for the
CACHEDWITHIN to expire.

Anyone has any idea is very welcomed to suggest.

thank



--------------------------------------------------------------------------
Global Internet phone calls, voicemail, fax, e-mail and instant messaging.
Sign-up today at http://www.hotvoice.com

______________________________________________________________________
Get Your Own Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusionb
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to