purge the dir cache periodically to prevent it from eating up lots of memory