Simple redis cache library with namespaces and PSR-6

v0.2.1 2016-08-31 04:04 UTC

This package is not auto-updated.

Last update: 2020-02-07 16:32:12 UTC


License StyleCI Build Status codecov Latest Stable Version HHVM Status

RedisCache is a simple cache library with key namespaces, Redis support, and PSR-6 implementation. To keep it simple, it only provides the simplest interface and brings with no dependencies (except PSR-6 interfaces). Different from other complex and redundant cache libraries, RedisCache is just tiny and powerful.


  • Support both Predis and PhpRedis
  • Support PSR-6
  • Store and manage keys in different namespaces
  • Use with fluent interface
  • Utilize lazy recording for better performance
  • Utilize additional in-memory cache to reduce I/O
  • No dependencies except PSR-6 interfaces


  • PHP 5.3 or newer
  • Redis 2.8 or newer


RedisCache is Composer and PSR-4 ready. To install it, just run the following command:

composer require dyweb/redis-cache

Getting Started

Please check the examples here.


Please check the configuration doc.



Contributing to this project is highly appreciated through merge requests for new features or bug fixes, bug reporting or just suggestions. Please follow the PSR-2 coding standard when contributing, and ensure that all your contributions are not against our coding style and integrated tests.


Follow these commands to configure the necessary environment and run checks and tests:

composer install

# run tests

The latest version of PHPUnit is recommended for testing.


The code for this project is distributed under the terms of the MIT License. (See LICENSE)