public static function call($key, callable $func)
    {
        $trace = debug_backtrace();
        if ($function = $trace[1]["function"]) {
            $key = $function . "_" . $key;
            if ($class = $trace[1]["class"]) {
                $key = str_replace("\\", "_", $class) . "_" . $key;
            }
        }

        if (static::check($key)) {
            return static::get($key);
        }

        $return = $func();

        static::set($key, $return);

        return $return;
    }
public static function call($key, callable $func)
    {
        $trace = debug_backtrace();
        if ($function = $trace[1]["function"]) {
            $key = $function . "_" . $key;
            if ($class = $trace[1]["class"]) {
                $key = str_replace("\\", "_", $class) . "_" . $key;
            }
        }

        if (static::check($key)) {
            return static::get($key);
        }

        $return = $func();

        static::set($key, $return);

        return $return;
    }
public static function call ( $ key , callable $ func ) { $ trace = debug_backtrace ( ) ; if ( $ function = $ trace [ 1 ] [ "function" ] ) { $ key = $ function . "_" . $ key ; if ( $ class = $ trace [ 1 ] [ "class" ] ) { $ key = str_replace ( "\\" , "_" , $ class ) . "_" . $ key ; } } if ( static :: check ( $ key ) ) { return static :: get ( $ key ) ; } $ return = $ func ( ) ; static :: set ( $ key , $ return ) ; return $ return ; }
Convience method to retrieve a value if it's cached, or run the callback and cache the data now if not.

@param string $key The key of the cached data
@param callable $func A function to call that will return the value to cache

@return mixed
Convience method to retrieve a value if it s cached or run the callback and cache the data now if not .