dereuromark/cakephp-cache

Cache plugin for CakePHP

Installs: 4 667

Dependents: 1

Suggesters: 0

Stars: 23

Watchers: 4

Forks: 8

Open Issues: 4

Type:cakephp-plugin

0.3.1 2018-04-19 18:09 UTC

README

Build Status Coverage Status Latest Stable Version Minimum PHP Version License Coding Standards

This branch is for use with CakePHP 3.7+.

What is it for?

It is the successor of the 2.x CacheHelper and allows you to cache your complete views as HTML. No dynamic parts anymore, just complete static content ready to be delivered. If you don't want to set up ESI and other third party caching software, this CakePHP only approach does the job.

It uses a Middleware and a Component. Why not a helper anymore? Mainly because a helper is too limited and would not be able to cache serialized views, e.g. JSON, CSV, RSS content which have been build view-less.

Demo

sandbox.dereuromark.de/sandbox/cache-examples/

Installation

You can install this plugin into your CakePHP application using composer.

The recommended way to install composer packages is:

composer require dereuromark/cakephp-cache

Also don't forget to load the plugin in your bootstrap:

Plugin::load('Cache');
// or
Plugin::loadAll();

Usage

This plugin contains a full-page view cache solution as well as a partial cache solution.

For details see /docs.