Skip to content

Commit 1d23310

Browse files
Update readme.md, remove Stash, add Cache (#1458)
fixes #1101
1 parent a68d080 commit 1d23310

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,14 +265,21 @@ $response = $httpClient->get('https://www.googleapis.com/plus/v1/people/me');
265265
It is recommended to use another caching library to improve performance. This can be done by passing a [PSR-6](http://www.php-fig.org/psr/psr-6/) compatible library to the client:
266266

267267
```php
268-
$cache = new Stash\Pool(new Stash\Driver\FileSystem);
268+
use League\Flysystem\Adapter\Local;
269+
use League\Flysystem\Filesystem;
270+
use Cache\Adapter\Filesystem\FilesystemCachePool;
271+
272+
$filesystemAdapter = new Local(__DIR__.'/');
273+
$filesystem = new Filesystem($filesystemAdapter);
274+
275+
$cache = new FilesystemCachePool($filesystem);
269276
$client->setCache($cache);
270277
```
271278

272-
In this example we use [StashPHP](http://www.stashphp.com/). Add this to your project with composer:
279+
In this example we use [PHP Cache](http://www.php-cache.com/). Add this to your project with composer:
273280

274281
```
275-
composer require tedivm/stash
282+
composer require cache/filesystem-adapter
276283
```
277284

278285
### Updating Tokens ###

0 commit comments

Comments
 (0)