Re: clearCache() unexpected behavior
Yes that was what I meant, but I probably wasn't clear enough. But I don't understand why it should do even that. clearCache() with no filename does that already. Why would I want the "fallback" behavior of - if 'cachefile' does not exist then delete every other cache file - in the view directory of-course. I just don't get it since it forces most calls to the function to be wrapped in an if- clause checking if the cache exists. On Aug 11, 9:10 pm, gerhardsletten wrote: > Think it only deletes files under tmp/cache/views --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: clearCache() unexpected behavior
Think it only deletes files under tmp/cache/views --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
clearCache() unexpected behavior
Hi, I like posting here before adding anything to trac to get some feedback first. clearCache() in basics.php does clearing up of specific cache files. I have been under the impression that it was not necessary for me to check the existence of the cached file first but it looks like I have to. It strikes me as a strange behavior and I'd almost call it a bug. clearCache(); // clears out all files (in tmp/cache/views) clearCache('posts/some_existing_cached_post'); // deletes the desired file clearCache('a_filename_I_just_made_up'); // clears out all files because the requested file could not be found. The, to me, illogical in this is that if I want to call this function from a cron I need to make sure the cached file has been generated since my last pass or I will delete all cached view files. I was expecting clearCache() to just return false, not empty out my directory. If there is a good reason for this greedy deletion I think the docs could be clearer on the subject. /Martin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---