Download the PHP package asanikovich/laravel-roadrunner-cache without Composer
On this page you can find all versions of the php package asanikovich/laravel-roadrunner-cache. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download asanikovich/laravel-roadrunner-cache
More information about asanikovich/laravel-roadrunner-cache
Files in asanikovich/laravel-roadrunner-cache
Package laravel-roadrunner-cache
Short Description RoadRunner KV cache for laravel
License MIT
Homepage https://github.com/asanikovich/laravel-roadrunner-cache
Informations about the package laravel-roadrunner-cache
Laravel RoadRunner Cache
This Laravel package allows you to work with RoadRunner KV Cache in Laravel (as a cache driver).
For laravel/octane users
Please note, that swoole
in-memory or table cache works only inside HTTP workers.
If you want a cache that works from all parts of PHP (HTTP or CLI) - our package and RoadRunner KV will help you.
Getting Started
Installing the Package
You can install the package via composer:
Configuration
Configuration RoadRunner
Make sure you have in your RoadRunner config file (.rr.yaml
) next sections:
RPC
sectionKV
section
Full example of RoadRunner configuration file:
Publish config
Publish the config file and setup RPC connection:
Serializers
Package supports next serializers (should be configured in store
config):
null
- default phpserializer
igbinary
- igbinary serializer,ext-igbinary
is required to be installed
Encryption
Package supports encryption with sodium
, requirements:
ext-sodium
required to be installedencryption_key
filled instore
config (generated bysodium_crypto_box_keypair()
)
Setup cache config file
Add to cache configuration file (/config/cache.php
) new store with driver roadrunner
:
Config file example
Usage
To use in your code:
All done! 🚀
Development
Here are some useful commands for development
Before running tests run docker-compose:
Run tests:
Run tests with coverage:
Perform type checking:
Format your code:
Updates and Changes
For details on updates and changes, please refer to our CHANGELOG.
License
Laravel RoadRunner Cache is released under The MIT License (MIT). For more information, please see our License File.