spiral/roadrunner-kv

RoadRunner kv plugin bridge

Maintainers

👁 wolfy-j

Package info

github.com/roadrunner-php/kv

Homepage

Issues

Chat

Documentation

pkg:composer/spiral/roadrunner-kv

Fund package maintenance!

roadrunner-server

Statistics

Installs: 3 823 504

Dependents: 12

Suggesters: 0

Stars: 11

v4.3.1 2025-05-05 13:08 UTC

Requires

Requires (Dev)

Suggests

  • ext-igbinary: (>3.1.6) Igbinary serailizer support
  • ext-sodium: Sodium serailizer support

Provides

None

Conflicts

None

Replaces

None

MIT 0db13f212c64463bd26cf71e28d0a8bdf997a4a0

  • Wolfy-J <wolfy.jd.woop@gmail.com>
  • Pavel Buchnev (butschster) <pavel.buchnev.woop@spiralscout.com>
  • Aleksei Gagarin (roxblnfk) <alexey.gagarin.woop@spiralscout.com>
  • Maksim Smakouz (msmakouz) <maksim.smakouz.woop@spiralscout.com>
  • Kirill Nesmeyanov (SerafimArts) <kirill.nesmeyanov.woop@spiralscout.com>
  • RoadRunner Community

This package is auto-updated.

Last update: 2026-05-29 11:21:00 UTC


README

👁 Image

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.

Installation

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

Usage

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:

rpc:
 listen: tcp://127.0.0.1:6001

kv:
 test:
 driver: memory
 config:
 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.

<?php

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

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

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

$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

License:

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