Пример #1
0
 /**
  * Purge all cache system wide
  *
  * @param Array|Garp_Model_Db $tags
  * @param Boolean $createClusterJob Whether this purge should create a job to clear the other
  *                                  nodes in this server cluster, if applicable.
  * @param String $cacheDir Directory which stores static HTML cache files.
  * @return Void
  */
 public static function purge($tags = array(), $createClusterJob = true, $cacheDir = false)
 {
     if ($tags instanceof Garp_Model_Db) {
         $tags = self::getTagsFromModel($tags);
     }
     self::purgeStaticCache($tags, $cacheDir);
     self::purgeMemcachedCache($tags);
     $ini = Zend_Registry::get('config');
     if ($createClusterJob && $ini->app->clusteredHosting) {
         Garp_Cache_Store_Cluster::createJob($tags);
     }
 }