0

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?

2 Answers 2

1
+50

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.

2

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 {} \;
2
  • 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, 2012 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, 2012 at 13:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .