Skip to content

abouvier/slim-redis-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RedisCache

Redis cache middleware for Slim framework.

Installation

composer require abouvier/slim-redis-cache

Usage

Cache every successful HTTP response for 8 hours in the local Redis server.

$app = new \Slim\Slim();
// ...
$client = new \Predis\Client('tcp://localhost:6379', [
	'prefix' => $app->environment['SERVER_NAME']
]);
$app->add(new \Slim\Middleware\RedisCache($client, [
	'timeout' => 28800
]));
// ...
$app->run();

About

Redis cache middleware for Slim framework

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages