https://github.com/roadrunner-php/kv
:electric_plug: RoadRunner Key-Value storage SDK
https://github.com/roadrunner-php/kv
boltdb cache caching-library memcached memory php redis roadrunner
Last synced: 3 months ago
JSON representation
:electric_plug: RoadRunner Key-Value storage SDK
- Host: GitHub
- URL: https://github.com/roadrunner-php/kv
- Owner: roadrunner-php
- License: mit
- Created: 2020-04-15T08:14:25.000Z (over 5 years ago)
- Default Branch: 4.x
- Last Pushed: 2025-05-05T13:09:20.000Z (8 months ago)
- Last Synced: 2025-09-27T22:31:12.210Z (4 months ago)
- Topics: boltdb, cache, caching-library, memcached, memory, php, redis, roadrunner
- Language: PHP
- Homepage: https://roadrunner.dev
- Size: 213 KB
- Stars: 10
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# RoadRunner KV Plugin Bridge
[](https://packagist.org/packages/spiral/roadrunner-kv)
[](https://packagist.org/packages/spiral/roadrunner-kv)
[](https://github.com/spiral/roadrunner-kv/actions)
[](https://github.com/spiral/roadrunner-kv/actions)
[](https://packagist.org/packages/spiral/roadrunner-kv)
[Documentation](https://docs.roadrunner.dev/key-value/overview-kv) | [Framework Bundle](https://github.com/spiral/framework)
This repository contains the codebase PSR-16 PHP cache bridge using kv RoadRunner plugin.
## Installation
To install application server and KV codebase
```bash
composer require spiral/roadrunner-kv
```
You can use the convenient installer to download the latest available compatible
version of RoadRunner server:
```bash
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:
```yaml
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](https://docs.roadrunner.dev) 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
select('test');
// After that you can write and read arbitrary values:
$cache->set('key', 'value');
echo $cache->get('key'); // string(5) "value"
```
## License:
MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information. Maintained by [Spiral Scout](https://spiralscout.com).