PHPackages                             ewilde-imperial/strokercache - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. ewilde-imperial/strokercache

ActiveLibrary[Caching](/categories/caching)

ewilde-imperial/strokercache
============================

Provides a full page cache solution for Laminas

3.0.0(6y ago)0470MITPHPPHP &gt;=5.6

Since Dec 28Pushed 6y agoCompare

[ Source](https://github.com/ewilde-imperial/zf2-fullpage-cache)[ Packagist](https://packagist.org/packages/ewilde-imperial/strokercache)[ Docs](https://github.com/ewilde-imperial/zf2-fullpage-cache)[ RSS](/packages/ewilde-imperial-strokercache/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (12)Versions (20)Used By (0)

StrokerCache
============

[](#strokercache)

[![Build Status](https://camo.githubusercontent.com/0600268327cae0c4356ec0a70082910c1a50b6df26443fd06e2b4700a003ec75/68747470733a2f2f7472617669732d63692e6f72672f6272616d7374726f6b65722f7a66322d66756c6c706167652d63616368652e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/bramstroker/zf2-fullpage-cache)[![Code Coverage](https://camo.githubusercontent.com/9f0747c38b71580a3cc42c58104a300bb66ba5a6beac37f010b0079de6676041/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6272616d7374726f6b65722f7a66322d66756c6c706167652d63616368652f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/bramstroker/zf2-fullpage-cache/?branch=master)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/4d8ff50591b68b1556ef602ab974c8c346be0c8cf9b9b1d2495572dd6a147dda/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6272616d7374726f6b65722f7a66322d66756c6c706167652d63616368652f6261646765732f7175616c6974792d73636f72652e706e673f733d38326366613666383764626531306338633964396537346361363230323761383061386339636662)](https://scrutinizer-ci.com/g/bramstroker/zf2-fullpage-cache/)[![SensioLabsInsight](https://camo.githubusercontent.com/e2c2dbe13998d43068723b012e3f97181ff3ca69dcdf105f9674e2fcc36e5802/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f62393963326630382d333263322d346335372d393233652d6130626533616639383232372f6d696e692e706e67)](https://insight.sensiolabs.com/projects/b99c2f08-32c2-4c57-923e-a0be3af98227)[![Total Downloads](https://camo.githubusercontent.com/7b298594c2d6493315181096b7122d213910245748d3c70e52d385ebd2dded56/68747470733a2f2f706f7365722e707567782e6f72672f7374726f6b65722f63616368652f646f776e6c6f6164732e737667)](https://packagist.org/packages/stroker/cache)[![Latest Stable Version](https://camo.githubusercontent.com/f50a0cfd72492c3fa398ec9b99bb741d8dc34d4463ff8d47538dfdbe284e2776/68747470733a2f2f706f7365722e707567782e6f72672f7374726f6b65722f63616368652f762f737461626c652e737667)](https://packagist.org/packages/stroker/cache)

This module provides a full page cache solution for Laminas.

Installation
------------

[](#installation)

Installation of StrokerCache uses composer. For composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).

1. `cd my/project/directory`
2. create or modify the `composer.json` file within your ZF2 application file with following contents:

    ```
    {
        "require": {
            "stroker/cache": "*"
        }
    }
    ```
3. install composer via `curl -s https://getcomposer.org/installer | php` (on windows, download  and execute it with PHP). Then run `php composer.phar install`
4. open `my/project/directory/configs/application.config.php` and add the following key to your `modules`:

    ```
    'StrokerCache',
    ```

Setup cache rules
-----------------

[](#setup-cache-rules)

Copy the file `strokercache.local.php.dist` to your config/autoload directory and rename to `strokercache.local.php`. Edit this file to reflect your needs.

The module provides several strategies to determine if a page should be cached.

- By routename
- By controller classname
- By regex on the URI
- Disable caching for authenticated users

### Examples

[](#examples)

Caching the home route:

```
