function clearPageCache() { require_once dirname(__FILE__) . '/../../embed.php'; GalleryEmbed::init(); $ret1 = GalleryCoreApi::removeAllMapEntries('GalleryCacheMap'); $ret2 = GalleryEmbed::done(); if ($ret1 || $ret2) { $status[] = array('error', 'Error deleting page cache!'); } else { $status[] = array('info', 'Successfully deleted page cache'); } return $status; }
function clearPageCache() { global $gallery; $storage =& $gallery->getStorage(); $ret = GalleryCoreApi::removeAllMapEntries('GalleryCacheMap', true); if ($ret) { $status = array(array('error', 'Error deleting page cache!')); } else { $status = array(array('info', 'Successfully deleted page cache')); } $ret = $storage->checkPoint(); if ($ret) { $status[] = array('error', 'Error committing transaction!'); } return $status; }