/** * Invalidates caches when the database is changed or the user logs out. * * @param string $pageCacheDir page cache directory */ function invalidateCaches($pageCacheDir) { // Purge cache attached to session. if (isset($_SESSION['tags'])) { unset($_SESSION['tags']); } // Purge page cache shared by sessions. purgeCachedPages($pageCacheDir); }
/** * Purge cached pages - missing directory */ public function testPurgeCachedPagesMissingDir() { $this->assertEquals('Cannot purge tests/dummycache_missing: no directory', purgeCachedPages(self::$testCacheDir . '_missing')); }