variableName is meaned to be created by you, dynamically based on the
SQL code executed. When you have WHERE, AND, OR statements (as well as
group by, distinct, order by, joins, count, max, top, etc.etc.) in your
query sql code you must make sure the variable it is cached in is not
the same as a query executed with another combination of AND OR, or else
those results would be false.


<cfif producttype EQ "candy">
            <cfset variableName = variableName & "candy">
</cfif>
<cfif showopen>
            <cfset variableName = variableName & "showopen">
</cfif>


Then you have figured out a variableName to be used for your query BASED
ON what you are executing against the database server, and based on "hey
this query here is in line 35 in my page let's call it cachedThing
despite the fact the code it executes is related to what I am filtering
on".
That is why caching in application scope is a little bit more work with
highly dynamic queries.
Micha Schopman
Software Engineer
Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to