For some reason one of my sites has become incredibly slow, both on the front-end and on the back-end. All pages take >1 second to load and in the back-end the tree and any AJAX takes a very long time to finish loading.
In the error log I have spotted two errors which occur about 10-20 times each time any page is loaded, I think this is the culprit but I have no idea how to fix it:
[2013-10-31 18:58:50] (ERROR @ /path/to/server/core/xpdo/cache/xpdocachemanager.class.php : 510) PHP warning: unlink(/path/to/server/core/cache/db/objects/modTemplateVar/cfd6650c37ea8f0a5a23a67af4455c4e.cache.php): No such file or directory
[2013-10-31 18:58:50] (ERROR @ /path/to/server/core/xpdo/cache/xpdocachemanager.class.php : 518) PHP warning: closedir(): 366 is not a valid Directory resource
The number in "366 is not a valid Directory resource" seem to change every time the error occurs.
I've tried clearing the cache, deleting the /cache/ folder manually and this doesn't seem to have any effect. The system just rebuilds the cache files and the problem still persists.
Has anybody seen this before or got any ideas?