Skip to content

Commit 80e5369

Browse files
authored
Merge pull request #36 from WyriHaximus/Drop-loop-from-readme-example
2 parents fdfb7fc + a8cf74d commit 80e5369

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

README.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,10 @@ composer require wyrihaximus/react-cache-redis
2323
<?php
2424

2525
use Clue\React\Redis\Client;
26-
use Clue\React\Redis\Factory as RedisFactory;
27-
use React\EventLoop\Factory as LoopFactory;
26+
use Clue\React\Redis\Factory;
2827
use WyriHaximus\React\Cache\Redis;
2928

30-
$loop = LoopFactory::create();
31-
$factory = new RedisFactory($loop);
32-
33-
$factory->createClient()->then(function (Client $client) {
29+
(new Factory())->createClient()->then(function (Client $client) {
3430
$cache = new Redis($client, 'react:cache:your:key:prefix:');
3531
});
3632
```
@@ -39,7 +35,7 @@ $factory->createClient()->then(function (Client $client) {
3935

4036
The MIT License (MIT)
4137

42-
Copyright (c) 2018 Cees-Jan Kiewiet
38+
Copyright (c) 2021 Cees-Jan Kiewiet
4339

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

0 commit comments

Comments
 (0)