public static function put(string $key, $value, string $storage = 'global'): void
    {
        self::initialize($storage);
        $expiration = time() + intval(self::$seconds);
        $value = $expiration . self::$marker . serialize($value);
        $fileKey = self::key($key);
        @file_put_contents(self::$path . '/' . $storage . '/' . $fileKey, $value);
    }
public static function put(string $key, $value, string $storage = 'global'): void
    {
        self::initialize($storage);
        $expiration = time() + intval(self::$seconds);
        $value = $expiration . self::$marker . serialize($value);
        $fileKey = self::key($key);
        @file_put_contents(self::$path . '/' . $storage . '/' . $fileKey, $value);
    }
public static function put ( string $ key , $ value , string $ storage = 'global' ) : void { self :: initialize ( $ storage ) ; $ expiration = time ( ) + intval ( self :: $ seconds ) ; $ value = $ expiration . self :: $ marker . serialize ( $ value ) ; $ fileKey = self :: key ( $ key ) ; @ file_put_contents ( self :: $ path . '/' . $ storage . '/' . $ fileKey , $ value ) ; }
Put cache.

@param string $key
@param mixed $value
@param string $storage Default 'global'.
@throws \Exception
Put cache .