palanik / slim-apc-cache
Cache Middleware for PHP Slim micro framework using APC Cache
0.0.2
2015-02-09 01:57 UTC
Requires
- slim/slim: 2.4.0
This package is auto-updated.
Last update: 2024-11-24 13:19:08 UTC
README
Cache Middleware for PHP Slim micro framework using APC Cache
How to Install
- Update your
composer.json
to require thepalanik/slim-apc-cache
package. - Run
composer install
to add SlimAPCCache your vendor folder.
{ "require": { "palanik/slim-apc-cache": "0.0.2.*" } }
##How to Use this Middleware
<?php require ('./vendor/autoload.php'); $app = new \Slim\Slim(); use palanik\SlimAPCCache\SlimAPCCache; $app->add(new SlimAPCCache(array( 'ttl' => 60, 'caching_prefix' => 'myapp_', ))); $app->get('/foo', function () use ($app) { echo "Hello Bar"; }); $app->run(); ?>