$script = eZScript::instance( array( 'description' => ( "eZ Publish static cache generator\n" . "\n" . "./bin/makestaticcache.php --siteaccess user" ), 'use-session' => false, 'use-modules' => true, 'use-extensions' => true ) ); $script->startup(); $options = $script->getOptions( "[f|force]", "", array( 'force' => "Force generation of cache files even if they already exist." ) ); $force = $options['force']; $script->initialize(); $staticCache = new eZStaticCache(); $staticCache->generateCache( $force, false, $cli, false ); if ( !$force ) { $staticCache->generateAlwaysUpdatedCache( false, $cli, false ); } eZStaticCache::executeActions(); $script->shutdown(); ?>
$objectID = $module->actionParameter('ObjectID'); } if ($cacheType == 'All') { eZCache::clearAll(); } elseif ($cacheType == 'Template') { eZCache::clearByTag('template'); } elseif ($cacheType == 'Content') { eZCache::clearByTag('content'); } elseif ($cacheType == 'TemplateContent') { eZCache::clearByTag('template'); eZCache::clearByTag('content'); } elseif ($cacheType == 'Ini') { eZCache::clearByTag('ini'); } elseif ($cacheType == 'Static') { $staticCache = new eZStaticCache(); $staticCache->generateCache(true, true); $cacheCleared['static'] = true; } elseif ($cacheType == 'ContentNode') { $contentModule = eZModule::exists('content'); if ($contentModule instanceof eZModule) { $contentModule->setCurrentAction('ClearViewCache', 'action'); $contentModule->setActionParameter('NodeID', $nodeID, 'action'); $contentModule->setActionParameter('ObjectID', $objectID, 'action'); $contentModule->run('action', array($nodeID, $objectID)); } } elseif ($cacheType == 'ContentSubtree') { $contentModule = eZModule::exists('content'); if ($contentModule instanceof eZModule) { $contentModule->setCurrentAction('ClearViewCacheSubtree', 'action'); $contentModule->setActionParameter('NodeID', $nodeID, 'action'); $contentModule->setActionParameter('ObjectID', $objectID, 'action');