Skip to content

Commit

Permalink
Merge pull request #5 from bcremer/patch-1
Browse files Browse the repository at this point in the history
Fix Service Provider example
  • Loading branch information
akrabat committed Jun 8, 2015
2 parents 215f7ed + bb8bd2b commit 8498366
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ $app = new \Slim\App();
// Register middleware
$app->add(new \Slim\HttpCache\Cache('public', 86400));

// Fetch DI Container
$container = $app->getContainer();

// Register service provider
$app->register(new \Slim\HttpCache\CacheProvider);
$container->register(new \Slim\HttpCache\CacheProvider);

// Example route with ETag header
$app->get('/foo', function ($req, $res, $args) {
Expand Down

0 comments on commit 8498366

Please sign in to comment.