public static function expires($cacheloc, $cachekey)
    {
        $cacheloc = "cache_" . $cacheloc;
        if ( isset($_SESSION[$cacheloc]) ) {
            $cache_row = $_SESSION[$cacheloc];
            if ( time() >= $cache_row[2] ) { 
                unset($_SESSION[$cacheloc]);
                return false;
            }
            if ( $cache_row[0] != $cachekey ) return false;
            if ( $cache_row[0] === false ) return false;
            return $cache_row[2] - time();
        }
        return false;
    }