imdbphp
imdbphp copied to clipboard
Add a limit on how frequently a cache purge can occur
Cache purging occurs every time an imdb class is created. This is hugely wasteful, especially if there are lots of cache files.
Either remember the last purge time across requests and only do a purge every x hours or make sure it only happens once per request.
Alternatively, do it the way PHP itself deals with its session files: Leave purging to a Cron job. Not sure how that's done on a Windows machine, though.