Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

NotificationsYou must be signed in to change notification settings

WyriHaximus/reactphp-cache-psr-16-adapter

Repository files navigation

ReactPHPPSR-16 cache adapter

Continuous IntegrationLatest Stable VersionTotal DownloadsLicense

Installation

To install viaComposer, use the command below, it will automatically detect the latest version and bind it with^.

composer require wyrihaximus/react-cache-psr-16-adapter

Usage

Take anyreact/cache implementation, likewyrihaximus/react-cache-redis we'll be using in this example.Decorate it with aPSR16Adapter instance, and you can use them as a PSR-16 cache within fibers. Directly, or withother packages. InternallyPSR16Adapter usesawait on every method call to thereact/cache implementation to make it compatible.

$cache =newPSR16Adapter(newRedis($reditClient,'react:cache:your:key:prefix:'));React\Async\async(function () {$cache->set('key','value');// All methods use `await` internally to make any ReactPHP cache PSR-16 compatibleecho$cache->get('key');// echos: value})();

Contributing

Please seeCONTRIBUTING for details.

License

Copyright 2022Cees-Jan Kiewiet

Permission is hereby granted, free of charge, to any personobtaining a copy of this software and associated documentationfiles (the "Software"), to deal in the Software withoutrestriction, including without limitation the rights to use,copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom theSoftware is furnished to do so, subject to the followingconditions:

The above copyright notice and this permission notice shall beincluded in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIESOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE ANDNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHTHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISINGFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OROTHER DEALINGS IN THE SOFTWARE.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp