src/psr4/Cache.php
public static function remember( $key, $expires, Closure $closure )
	{
		$cache = self::instance();
		if ( $cache ) {
			if ( $cache->isExisting( $key ) ) {
				return $cache->get( $key );
			} else if ( $closure != null ) {
				$value = $closure();
				$cache->set( $key, $value, $expires * 60 );
				return $value;
			}
		}
		return $closure();
	}
public static function remember( $key, $expires, Closure $closure )
	{
		$cache = self::instance();
		if ( $cache ) {
			if ( $cache->isExisting( $key ) ) {
				return $cache->get( $key );
			} else if ( $closure != null ) {
				$value = $closure();
				$cache->set( $key, $value, $expires * 60 );
				return $value;
			}
		}
		return $closure();
	}
public static function remember ( $ key , $ expires , Closure $ closure ) { $ cache = self :: instance ( ) ; if ( $ cache ) { if ( $ cache -> isExisting ( $ key ) ) { return $ cache -> get ( $ key ) ; } else if ( $ closure != null ) { $ value = $ closure ( ) ; $ cache -> set ( $ key , $ value , $ expires * 60 ) ; return $ value ; } } return $ closure ( ) ; }
Returns the value of a given key.
If it doesn't exist, then the value pass by is returned.
@since 1.0
@param string  $key     Main plugin object as reference.
@param int  	  $expires Expiration time in minutes.
@param Closure $value   Value to cache.
@return mixed
Returns the value of a given key . If it doesn t exist then the value pass by is returned .