diff --git a/lib/variables.php b/lib/variables.php index cbc4959..a1a3eb6 100644 --- a/lib/variables.php +++ b/lib/variables.php @@ -24,23 +24,32 @@ /*****************/ /* CACHE HANDLER */ /*****************/ + // La cache la puede gobernar el plugin `cache_handler` (catalogo central en + // ws:cms/lib/plugins/cache_handler), que se engancha al checkpoint `cache` y + // se configura desde el dashboard: Ajustes > Configurar plugins. + // + // El orden importa: lo de aqui arriba es el DEFAULT de una web recien creada + // y el checkpoint va DESPUES, para que el plugin — cuando este instalado y + // activo — pueda apagar tambien lo que se haya encendido aqui. Sin el plugin, + // la web se comporta como siempre: solo cache local de consultas. // define("USE_INFORMATION_SCHEMA_CACHE", true); - // Cache local que cachea las consultas en cada petición cuando se repitan (sin Redis) - -// CocoDB::$noCacheURIS = ["\/mi(s)?-(.*)(\/)(.*)","\/hooks\/(.*)?","\/login\/(.*)?"]; +// CocoDB::$noCacheURIS = ["\\/mi(s)?-(.*)(\\/)(.*)","\\/hooks\\/(.*)?","\\/login\\/(.*)?"]; // CocoDB::$noCacheTABLES = ["aux_plg_payments","cms_cestas_abandonadas","cms_direcciones","cms_posibles_pedidos","cms_stock","cms_usuarios_metas","cms_usuarios"]; // -// // Activamos el Cache en general y de consultas +// // Cache general de consultas en Redis // CocoDB::fullCache(3); // -// // Activamos el Cache local que cache las consultas en cada carga cuando se repitan + // Cache local: cachea las consultas repetidas dentro de la misma peticion CocoDB::localCache(); // // CocoDB::$force_redis_module = @CocoDB::bloquedCacheByURL($_SERVER["REQUEST_URI"]) ? false : true; // CocoDB::$force_redis_html = @CocoDB::bloquedCacheByURL($_SERVER["REQUEST_URI"]) ? false : true; + $cacheHandlerVars = array("uri" => @$_SERVER["REQUEST_URI"]); + if (function_exists("addPlugins")) addPlugins("cache", $cacheHandlerVars); + $plantilla = "template/estandar"; define("PLANTILLA",$plantilla); define("RUTA_PLANTILLA","/".$plantilla);