def cleanCache(): """ removes an entire cache directory""" path = os.path.join(Config().getInstance().getXMLCacheDir(), "categories") if os.path.exists(path): shutil.rmtree(path) path = os.path.join(Config().getInstance().getXMLCacheDir(), "events") if os.path.exists(path): shutil.rmtree(path)
def _getCacheFileName(self): dir = os.path.join(Config().getInstance().getXMLCacheDir(), "abstract_books") if not os.path.exists(dir): os.makedirs(dir) return os.path.join(dir, '%s.pdf' % self._conf.getId())