OK query names are case sensitive :-)

-----Original Message-----
From: Russ 'Snake' Michaels [mailto:snake@;snakepit.net]
Sent: 29 October 2002 15:38
To: [EMAIL PROTECTED]
Subject: RE: [ cf-dev ] caching queries


no cozz unless I pass attributes to cause the content to change, the only
thing that changes is the query name and cached within, which are set the
same in both calls.


-----Original Message-----
From: Rich Wild [mailto:r.wild@;e-mango.com]
Sent: 29 October 2002 15:26
To: '[EMAIL PROTECTED]'
Subject: RE: [ cf-dev ] caching queries


sorry, what I'm trying to get at is: is it possible you are changing the
statement between the two calls of <cf_showcontent>?

> -----Original Message-----
> From: Rich Wild [mailto:r.wild@;e-mango.com]
> Sent: 29 October 2002 15:20
> To: '[EMAIL PROTECTED]'
> Subject: RE: [ cf-dev ] caching queries
>
>
> its not the template, its a) the name of the query and b) the
> contents (ie
> the actual statement)
>
> if the statement is different then its treated as a different query.
>
> The following code proves this...
>
> <cfscript>
> myquery = querynew("col1");
> for(i=1;i lte 10;i=i+1) {
>       queryaddrow(myquery);
>       querysetcell(myquery, "col1", i);
> }
> </cfscript>
>
> <cfquery name="testquery" dbtype="query"
> cachedwithin="#createtimespan(0,1,0,0)#">
> SELECT col1 FROM myquery WHERE col1 <= 5
> </cfquery>
>
> <cfdump var="#testquery#">
>
> <cfscript>
> for(i=1;i lte 10;i=i+1) {
>       querysetcell(myquery, "col1", 1, i);
> }
> </cfscript>
>
> <cfquery name="testquery" dbtype="query"
> cachedwithin="#createtimespan(0,1,0,0)#">
> SELECT col1 AS column1 FROM myquery WHERE col1 <= 5
> </cfquery>
>
> <cfdump var="#testquery#">
>
> > -----Original Message-----
> > From: Russ 'Snake' Michaels [mailto:snake@;snakepit.net]
> > Sent: 29 October 2002 15:16
> > To: [EMAIL PROTECTED]
> > Subject: [ cf-dev ] caching queries
> >
> >
> > When caching queries, is it only the query anme query name
> > that needs to be
> > the same, or is it also dependant on the template that called it.
> >
> > for example, I have a custom tag that queries a database with
> > a bunch of
> > passed params, including the cache period.
> > I also called this tag elsewhere from a content editor, and
> sending a
> > cachedwithin of "0", so effectively it should un-cache the query.
> > But the query seems to remain cached even though I am setting a
> > CreateTimeSpan(0,0,0,0)
> >
> > e.g
> >
> > in the site
> >
> > <CF_SHOWCONTENT cachedwithin="2" container="container1"
> > username="whatever"
> > password="whatever" datasource="whatever">
> >
> > and form the admin
> >
> > <CF_SHOWCONTENT cachedwithin="0" container="container1"
> > username="whatever"
> > password="whatever" datasource="whatever">
> >
> > and the query generated is thus
> >
> > <cfquery name="contentItems_#replace(attributes.container,'
> > ','_','ALL')#"
> > datasource="#attributes.DSN#" username="#attributes.username#"
> > password="#attributes.password#"
> > cachedwithin="#CreateTimeSpan(0,attributes.cachedwithin,0,0)#">
> > select #attributes.rowcount# #attributes.columnlist# from
> contentItems
> > where containerName = '#attributes.container#'
> > </cfquery>
> > <cfset "caller.#attributes.query#" =
> > evaluate('contentItems_#replace(attributes.container,'
> > ','_','ALL')#')>
> >
> >
> > --
> > ** 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]


--
** 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]


-- 
** 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