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?


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.


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 {} \;
  • 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
  • 1
    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 clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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