Hi,

In my controller I call a model method twice, I expect the second call
to return a modified db record but it returns the original non-
modified one.

I think this is something to do with Model Cache.

Could someone show me the code snippet to reset the cache so that the
second model method call returns data from the DB rather than from
cache?

e.g.

function controllerMethod()
{
  $this->modelName->getMethod();

 $this->modelName->setMethod('new_stuff');

  $this->modelName->_clearCache();
//above does not work, is this right? should I do this in the model's
getMethod? Elsewhere in the model?

  $this->modelName->getMethod();
//above returns same as previous call rather than new_stuff.

}

thanks.


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

Reply via email to