Forum: Ruby on Rails Methods for clearing page caches?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
CSN (Guest)
on 2006-01-16 11:53
(Received via mailing list)
Here's what I use, in a crontab entry:

*/30 * * * * find
/var/www/html/rails/public/categories/ -mmin +60 -exec
rm {} \;

I'd also like to remove empty directories, which are
easy enough to find with the '-empty' param, but rmdir
trips on non-empty parent directories which it finds
before children, and I'm not sure if I want to use 'rm
-r'. What methods have you come up with?

Also, is it possible to specify one cache directory in
/public, so that way I can keep all page caches in a
hierarchy under it?


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
This topic is locked and can not be replied to.