2017 © Pedro Peláez
 

library slim-middleware-apc-cache

Cache Middleware for PHP Slim 2.* micro framework using APCu Cache with response ttl setup

image

cleardevice/slim-middleware-apc-cache

Cache Middleware for PHP Slim 2.* micro framework using APCu Cache with response ttl setup

  • Saturday, April 30, 2016
  • by cd
  • Repository
  • 1 Watchers
  • 0 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

SlimMiddlewareAPCCache

Latest Stable Version License, (*1)

Cache Middleware for PHP Slim 2.* micro framework using APCu Cache, (*2)

Main idea from https://github.com/palanik/SlimAPCCache, (*3)

How to Install

  1. Update your composer.json to require the cleardevice/slim-middleware-apc-cache package.
  2. Run composer install to add SlimAPCCache your vendor folder.
{
  "require": {
    "cleardevice/slim-middleware-apc-cache": "0.1.0.*"
  }
}

How to Use this Middleware

add(new SlimMiddlewareAPCCache(60, 'myapp_prefix_');

$app->get('/foo_1', function () use ($app) {
    echo "Hello Bar, default ttl";
});

$app->get('/foo_2', function () use ($app) {
    echo "Hello Bar, custom cache ttl";
    $this->app->container->set(SlimMiddlewareAPCCache::TTL_KEY, 3600);
});

$app->get('/foo_3', function () use ($app) {
    echo "Hello Bar, no cache";
    $this->app->container->set(SlimMiddlewareAPCCache::TTL_KEY, SlimMiddlewareAPCCache::TTL_NO_CACHE);
});

$app->get('/foo_4', function () use ($app) {
    echo "Hello Bar, permanent cache";
    $this->app->container->set(SlimMiddlewareAPCCache::TTL_KEY, SlimMiddlewareAPCCache::TTL_PERMANENT_CACHE);
});

$app->run();
?>

The Versions

30/04 2016

dev-master

9999999-dev https://github.com/cleardevice/SlimMiddlewareAPCCache

Cache Middleware for PHP Slim 2.* micro framework using APCu Cache with response ttl setup

  Sources   Download

MIT

The Requires

 

by Avatar cd

middleware cache slim slimphp apcu slimcache slimmiddleware slimapcucache apcucache

30/04 2016

0.1.0

0.1.0.0 https://github.com/cleardevice/SlimMiddlewareAPCCache

Cache Middleware for PHP Slim 2.* micro framework using APCu Cache with response ttl setup

  Sources   Download

MIT

The Requires

 

by Avatar cd

middleware cache slim slimphp apcu slimcache slimmiddleware slimapcucache apcucache

25/04 2016

0.0.2

0.0.2.0 https://github.com/cleardevice/SlimMiddlewareAPCCache

Cache Middleware for PHP Slim 2.* micro framework using APC Cache with response ttl setup

  Sources   Download

MIT

The Requires

 

by Avatar cd

middleware cache apc slim slimphp slimcache slimmiddleware apccache slimapccache

24/04 2016

0.0.1

0.0.1.0 https://github.com/cleardevice/SlimMiddlewareAPCCache

Cache Middleware for PHP Slim 2.* micro framework using APC Cache with response ttl setup

  Sources   Download

MIT

The Requires

 

by Avatar cd

middleware cache apc slim slimphp slimcache slimmiddleware apccache slimapccache