diff options
Diffstat (limited to 'core/CacheFile.php')
-rw-r--r-- | core/CacheFile.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/CacheFile.php b/core/CacheFile.php index 8d877abddc..6a3f95cf9e 100644 --- a/core/CacheFile.php +++ b/core/CacheFile.php @@ -28,7 +28,6 @@ class Piwik_CacheFile function __construct($directory) { $this->cachePath = PIWIK_USER_PATH . '/tmp/cache/' . $directory . '/'; -// echo $this->cachePath;exit; } /** @@ -112,4 +111,12 @@ class Piwik_CacheFile } return false; } + + /** + * A function to delete all cache entries in the directory + */ + function deleteAll() + { + Piwik::unlinkRecursive($this->cachePath, $deleteRootToo = false); + } } |