quillphp/storage-redis

Redis storage driver for the Quill PHP framework

Maintainers

Package info

github.com/quillphp/quill-storage-redis

pkg:composer/quillphp/storage-redis

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2026-04-06 10:10 UTC

This package is auto-updated.

Last update: 2026-04-06 11:54:50 UTC


README

Redis storage driver for the Quill PHP Framework.

Requirements

  • PHP 8.3+
  • ext-redis

Installation

composer require quillphp/storage-redis

Usage

use Quill\Storage\RedisStorage;

$storage = new RedisStorage([
    'host'     => '127.0.0.1',
    'port'     => 6379,
    'database' => 0,
]);

// Write
$storage->set('user:42', $payload);
$storage->set('session:abc', $data, ttl: 3600);

// Read
$value = $storage->get('user:42');
$exists = $storage->has('user:42');

// Delete
$storage->delete('user:42');

// Always close when done
$storage->close();

Configuration

Option Type Default Description
host string '127.0.0.1' Redis server hostname or IP address.
port int 6379 Redis server port.
password string|null null Password for Redis AUTH. Leave null if authentication is disabled.
database int 0 Redis database index (0–15).
prefix string|null null Optional string prepended to every key. Useful for namespacing in shared Redis instances.
timeout float 0.0 Connection timeout in seconds. 0.0 means no timeout.
persistent_id string|null null Enables a persistent connection when set. The value acts as a connection identifier, allowing it to be reused across requests.

License

MIT