Skip to content

PatrickRose/flysystem-redis

Repository files navigation

flysystem-redis

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

A flysystem adapter for Redis

Installation

With composer of course:

"require": {
    "patrickrose/flysystem-redis": "~1"
}

Usage

$client = new Predis\Client();
$adapter = new PatrickRose\Flysystem\Redis\RedisAdapter($client);

$filesystem = new League\Flysystem\Filesystem($adapter);

Config options

update, updateStream, write, writeStream accept 3 config options:

Config option Description Valid values
expirationType The expiration resolution to use (either EX or PX). Defaults to null RedisAdapter::EXPIRE_IN_SECONDS, RedisAdapter::EXPIRE_IN_MILLISECONDS
ttl How long this key should live for. Defaults to forever. If set, expirationType is set to EX Any integer
setFlag How the key should be set (NX or XX) RedisAdapter::SET_IF_KEY_EXISTS, RedisAdapter::SET_IF_KEY_NOT_EXISTS

About

A flysystem adapter for Redis

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages