Try using the clearCache function instead, as documented here: http://api.cakephp.org/file/basics.php#function-clearCache Also, be sure to check the return values of these functions to see if it is in fact saying it was successful or not.
On Feb 7, 2:10 am, nurvzy <[email protected]> wrote: > So I've been reading documentation and looking through source and API > and I thought I'm doing the clearing of cache correctly but I'm a > little stumped as to why my element cache is not being cleared. > > I have a blog controller and whenever I add or edit a blog I want the > element->latest_news to be cleared from the cache. > > So I do something like this in the controller: > > if($Blog->save($this->data)){ > $this->clear_cache(); > // --- other stuff > > } > > private function clear_cache(){ > Cache::delete('latest_news'); > > } > > But the tmp/view/elements/element__latest_news file is still there. > I'm apparently doing something wrong, maybe because its 1 in the > morning and I've had a drink or two but I'm stumped. Help? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" 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 -~----------~----~----~----~------~----~------~--~---
