Skip to content

palanik/SlimNoCache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

SlimNoCache

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

About

PHP Slim Middleware to set no-cache headers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages