RoadRunner kv plugin bridge

v4.2.0 2024-05-09 16:52 UTC

This package is auto-updated.

Last update: 2024-07-23 12:54:12 UTC


RoadRunner KV Plugin Bridge

PHP Version Require Latest Stable Version phpunit psalm Total Downloads

Documentation | Framework Bundle

This repository contains the codebase PSR-16 PHP cache bridge using kv RoadRunner plugin.


To install application server and KV codebase

composer require spiral/roadrunner-kv

You can use the convenient installer to download the latest available compatible version of RoadRunner server:

composer require spiral/roadrunner-cli --dev
vendor/bin/rr get


First you need to add at least one kv plugin to your roadrunner configuration. For example, such a configuration would be quite feasible to run:

  listen: tcp://

    driver: memory
        interval: 10

Note Read more about all available drivers on the documentation page.

After starting the server with this configuration, one driver named "test" will be available to you.

The following code will allow writing and reading an arbitrary value from the RoadRunner server.


use Spiral\Goridge\RPC\RPC;
use Spiral\RoadRunner\KeyValue\Factory;

require __DIR__ . '/vendor/autoload.php';

$factory = new Factory(RPC::create('tcp://'));

$cache = $factory->select('test');

// After that you can write and read arbitrary values:

$cache->set('key', 'value');

echo $cache->get('key'); // string(5) "value"
try Spiral Framework


MIT License (MIT). Please see LICENSE for more information. Maintained by Spiral Scout.