# Cache wrapper # 2002-01-21 Sandino Araico Sánchez # Supressed the time_delta_html_comment() because it was having problems # with Javascript #------------------------------------------------------------------------------ require "hopp.conf.inc.php"; #define ("__DEBUG__",1); require __HOPP_INCLUDE_PATH."cache.inc"; if(!defined('__HOPP_CACHE_WRAPPER_TTL')) { #define ("__HOPP_CACHE_WRAPPER_TTL", 3600); //1 hora #define ("__HOPP_CACHE_WRAPPER_TTL", 518400); // 6 días #define ("__HOPP_CACHE_WRAPPER_TTL", 1); // 1 segundo define ('__HOPP_CACHE_WRAPPER_TTL', 60); // 1 minuto #define ("__HOPP_CACHE_WRAPPER_TTL", 86400); // 1 día } #------------------------------------------------------------------------------ //s_time_0(); #------------------------------------------------------------------------------ $doc_id_string=':CACHE:'; $doc_id_string.='PHP_SELF:'.$PHP_SELF.':'; $doc_id_string.='GET:'.serialize($HTTP_GET_VARS).':'; $doc_id_string.='POST:'.serialize($HTTP_POST_VARS).':'; $doc_id_string.='COOKIE:'.serialize($HTTP_COOKIE_VARS).':'; s_log("doc_id_string: $doc_id_string"); $doc_include=hopp_get_local_doc_array_from_cache($doc_id_string , __HOPP_CACHE_WRAPPER_TTL); if(empty($doc_include)) { ob_start(); } else { echo $doc_include; //echo s_time_delta_html_comment(); exit; } #------------------------------------------------------------------------------ ?>