Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
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;
}