how do disable SQL query cache???

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

how do disable SQL query cache???

Gil Vidals-2

I have a while loop that contains this line:


while ( ...condition..)
{
   $site_id = $this->Site->field('site_id', "authority = '$authority'");
}

I must be able to turn off Query Caching otherwise, the logic is
broken as you can see from the following sequence:

1) First time through the while loop with authority =
http://www.123.com/ and site_id returns  NULL since this record does
not exist

2) insert http://www.123.com into the sites table

3) second loop through the while loop does the same as 1) and should
return with a site_id, but instead returns site_id is NULL!!! This is
wrong.

Please show me how to turn off cacheQueries. I tried to use
$this->cacheQueries = false, but it had no positive effect.


--
[hidden email]

--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply | Threaded
Open this post in threaded view
|

Re: how do disable SQL query cache???

Grant Cox

cacheQueries is what you want, but it is a model attribute, so try
$this->Site->cacheQueries = false


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups "Cake PHP" group.
To post to this group, send email to [hidden email]
To unsubscribe from this group, send email to [hidden email]
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---