Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

OpenX creates many small php files in /openx/var/cache. After some time, the amount of files is so big that it has an impact on server performance (the amount of files was so big that listing the files was not possible.)

My question is: How often should I clear the cache directory? Is it safe to delete cache files older than 2 or 3 days?

share|improve this question
up vote 1 down vote accepted

Those files are cached adds to be served. Don't worry if number of files is greated than the number of unique banners you have ever served - multiple files per banner are common.

You can delete the files as often as you like (even every 10 minutes if you feel like it :P) - if you do it too often the only penalty is slight performance decrease - if they are still needed the file will be generated when add is first served.

share|improve this answer

You can give some listing of these files, so that one could tell you if they are important or not. However, to delete files older than 5 days use

find /openx/var/cache* -mtime +5 -exec rm {} \;
share|improve this answer
I know how to find and delete files. Only I dont know how old files I can delete. Didn't find any clue on google or on Openx site – B14D3 Jun 15 '12 at 12:20
Maybe you can delete files older than value set in Global Settings -> Banner delivery settings -> Time Between Banner Cache Updates. There you can set also memcache storage, if you have enough RAM and you are afraid of deleting old files. – John Jun 15 '12 at 13:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.