PHPackages                             kodus/predis-simple-cache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. kodus/predis-simple-cache

ActiveLibrary[Caching](/categories/caching)

kodus/predis-simple-cache
=========================

A lightweight bridge from predis/predis to a PSR-16 simple-cache interface

2.1.0(1y ago)037.6k↓14.7%11MITPHPPHP &gt;=8.0

Since Nov 2Pushed 1y ago2 watchersCompare

[ Source](https://github.com/kodus/predis-simple-cache)[ Packagist](https://packagist.org/packages/kodus/predis-simple-cache)[ RSS](/packages/kodus-predis-simple-cache/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (5)Versions (4)Used By (1)

kodus/predis-simple-cache
=========================

[](#koduspredis-simple-cache)

[![PHP Version](https://camo.githubusercontent.com/487804500a039aee09e5d93e41b745b4cd68dcc0fdf801e67d26d30b93f83358/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d382e302532422d626c75652e737667)](https://packagist.org/packages/kodus/predis-simple-cache)[![Build Status](https://github.com/kodus/predis-simple-cache/actions/workflows/test.yml/badge.svg)](https://github.com/kodus/predis-simple-cache/actions/workflows/test.yml/badge.svg)

A lightweight bridge from [predis/predis](https://packagist.org/packages/predis/predis) to the [PSR-16 simple-cache interface](https://www.php-fig.org/psr/psr-16/)

Installation
------------

[](#installation)

The library is distributed as a composer package.

```
composer require kodus/predis-simple-cache

```

Usage
-----

[](#usage)

Bootstrapping the cache class is very simple. The `PredisSimpleCache` constructor requires the predis client to store the cache items and a default TTL integer value.

In the example below the cache is constructed with a client with no custom settings and a default TTL of an hour.

```
