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 [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