palanik / slim-no-cache
no-cache response headers setting middleware for PHP Slim.
v0.0.1
2015-03-19 05:23 UTC
Requires
- slim/slim: >=2.4.0
This package is auto-updated.
Last update: 2024-11-24 13:19:08 UTC
README
PHP Slim Framework middleware to set no-cache response headers.
The implmentation is based on SO discussion on Browser cache.
Usage
Composer Autoloader
Install with Composer
- Update your
composer.json
to requirepalanik/slim-no-cache
package. - 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()); ?>