public static function cache(Repository $cache = null)
    {
        if (! $cache) {
            $filestore = new FileStore(new Filesystem(), storage_path());
            $cache = new Repository($filestore);
        }

        return new CacheMiddleware(
            new PrivateCacheStrategy(
                new LaravelCacheStorage($cache)
            )
        );
    }