public function getCachedObject($key) {
        $cache = HttpSession::instance()->getValue("__SESSION_CACHED_ITEMS");

        $timeouts = HttpSession::instance()->getValue("__SESSION_CACHE_TIMEOUTS");
        if (is_array($timeouts) && isset($timeouts[$key])) {
            $now = new \DateTime();
            $expiry = date_create_from_format("d/m/Y H:i:s", $timeouts[$key]);

            if ($now >= $expiry) {
                return null;
            }
        }

        return isset($cache[$key]) ? $cache[$key] : null;
    }
public function getCachedObject($key) {
        $cache = HttpSession::instance()->getValue("__SESSION_CACHED_ITEMS");

        $timeouts = HttpSession::instance()->getValue("__SESSION_CACHE_TIMEOUTS");
        if (is_array($timeouts) && isset($timeouts[$key])) {
            $now = new \DateTime();
            $expiry = date_create_from_format("d/m/Y H:i:s", $timeouts[$key]);

            if ($now >= $expiry) {
                return null;
            }
        }

        return isset($cache[$key]) ? $cache[$key] : null;
    }
public function getCachedObject ( $ key ) { $ cache = HttpSession :: instance ( ) -> getValue ( "__SESSION_CACHED_ITEMS" ) ; $ timeouts = HttpSession :: instance ( ) -> getValue ( "__SESSION_CACHE_TIMEOUTS" ) ; if ( is_array ( $ timeouts ) && isset ( $ timeouts [ $ key ] ) ) { $ now = new \ DateTime ( ) ; $ expiry = date_create_from_format ( "d/m/Y H:i:s" , $ timeouts [ $ key ] ) ; if ( $ now >= $ expiry ) { return null ; } } return isset ( $ cache [ $ key ] ) ? $ cache [ $ key ] : null ; }
Get a cached object by key

@param $key
Get a cached object by key