Skip to content

Commit

Permalink
Merge pull request #36 from WyriHaximus/Drop-loop-from-readme-example
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus authored Sep 1, 2021
2 parents fdfb7fc + a8cf74d commit 80e5369
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@ composer require wyrihaximus/react-cache-redis
<?php

use Clue\React\Redis\Client;
use Clue\React\Redis\Factory as RedisFactory;
use React\EventLoop\Factory as LoopFactory;
use Clue\React\Redis\Factory;
use WyriHaximus\React\Cache\Redis;

$loop = LoopFactory::create();
$factory = new RedisFactory($loop);

$factory->createClient()->then(function (Client $client) {
(new Factory())->createClient()->then(function (Client $client) {
$cache = new Redis($client, 'react:cache:your:key:prefix:');
});
```
Expand All @@ -39,7 +35,7 @@ $factory->createClient()->then(function (Client $client) {

The MIT License (MIT)

Copyright (c) 2018 Cees-Jan Kiewiet
Copyright (c) 2021 Cees-Jan Kiewiet

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

0 comments on commit 80e5369

Please sign in to comment.