Exemplo n.º 1
0
 /**
  * @param string $page
  * @return mixed
  */
 public static function isPageReady($page)
 {
     if (CShell::cache_trigger() && !self::isCacheClear() && ($cache = apc_fetch($page))) {
         date_default_timezone_set('America/New_York');
         $time = time();
         $timestamp = $cache['timestamp'];
         //Where is now?
         $now = EventTool::getTimePos($time);
         //Where is timestamp?
         $page = EventTool::getTimePos($timestamp);
         if ($now === $page) {
             return $cache['page'];
         }
     }
     return false;
 }