Пример #1
0
 public static function clearAllCaches()
 {
     AJXP_PluginsService::clearPluginsCache();
     self::clearMessagesCache();
     CacheService::deleteAll(AJXP_CACHE_SERVICE_NS_SHARED);
     if (function_exists('opcache_reset')) {
         opcache_reset();
     }
 }
Пример #2
0
 public function clearCacheByNS($actionName, $httpVars, $fileVars)
 {
     $ns = AJXP_Utils::sanitize($httpVars["namespace"], AJXP_SANITIZE_ALPHANUM);
     if ($ns == AJXP_CACHE_SERVICE_NS_SHARED) {
         ConfService::clearAllCaches();
     } else {
         CacheService::deleteAll($ns);
     }
     HTMLWriter::charsetHeader("text/json");
     echo json_encode(["result" => "ok"]);
 }