Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop loop from readme example #36

Merged
merged 1 commit into from
Sep 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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