Skip to content

Commit 96b987b

Browse files
authored
Merge pull request #75 from WyriHaximus/Update-readme-example-to-use-lazyclient
Update readme example to use lazyclient
2 parents e0d4813 + 9c2f4b6 commit 96b987b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Use Redis as a cache, implementing the [react/cache interface](https://github.co
1313
To install via [Composer](http://getcomposer.org/), use the command below, it will automatically detect the latest version and bind it with `^`.
1414

1515
```
16-
composer require wyrihaximus/react-cache-redis
16+
composer require wyrihaximus/react-cache-redis
1717
```
1818

1919
# Usage
@@ -25,16 +25,15 @@ use Clue\React\Redis\Client;
2525
use Clue\React\Redis\Factory;
2626
use WyriHaximus\React\Cache\Redis;
2727

28-
(new Factory())->createClient()->then(function (Client $client) {
29-
$cache = new Redis($client, 'react:cache:your:key:prefix:');
30-
});
28+
$client = (new Factory())->createLazyClient();
29+
$cache = new Redis($client, 'react:cache:your:key:prefix:');
3130
```
3231

3332
# License
3433

3534
The MIT License (MIT)
3635

37-
Copyright (c) 2024 Cees-Jan Kiewiet
36+
Copyright (c) 2025 Cees-Jan Kiewiet
3837

3938
Permission is hereby granted, free of charge, to any person obtaining a copy
4039
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)