Manually clear Concrete5 cache

Posted in October 2012 by under concrete5

Enabling the cache in Concrete5 is a good idea when the site is running in production, for the obvious benefit that it reduces page load times.

However sometimes odd things can happen if you are making updates to the site with the cache enabled. It is recommended not to enable the cache when developing a site.

I had a different problem. To reduce the number of brute force attacks against my login page I had made some tweaks to the code. Unfortunately I had managed to make is so that it was impossible to log in. I corrected the change in the code but the login page being served was from the cache.

So I was unable to log in. I was unable to log in and clear the cache!

It is trivial to clear the cache manually. Simply log into your server as you would normally access the files, over ssh, ftp, scp, etc. The delete the contents of /path/to/your/site/files/cache/

This clears the cache.

You can also use this to schedule clearing the cache via cron. So, to clear the cache every morning at 08:00, you'd use

00 08 * * * rm -rf /path/to/your/site/files/cache/*