palanik/slim-no-cache

no-cache response headers setting middleware for PHP Slim.

v0.0.1 2015-03-19 05:23 UTC

This package is auto-updated.

Last update: 2024-04-24 11:56:38 UTC


README

PHP Slim Framework middleware to set no-cache response headers.

The implmentation is based on SO discussion on Browser cache.

Latest Stable Version License

Usage

Composer Autoloader

Install with Composer

  1. Update your composer.json to require palanik/slim-no-cache package.
  2. Run composer install to add palanik/SlimNoCache your vendor folder.
{
  "require": {
    "palanik/slim-no-cache": "*"
  }
}

Autoloading

<?php
require ('./vendor/autoload.php');

$app = new \Slim\Slim();

$app->add(new \SlimNoCache\SlimNoCache());
?>

Custom Load

<?php
\Slim\Slim::registerAutoLoader();

$app = new \Slim\Slim();

require ('path_to_your_middlewares/SlimNoCache.php');
$app->add(new \SlimNoCache\SlimNoCache());
?>

License

MIT