blainesch/li3_memoize

Will aid in the caching of expensive helper/model instance methods.


Keywords
cache, proxy, lithium, li3, speed, memoize
License
DSDP

Documentation

Helper/Model caching plugin for Lithium PHP

Will aid in the caching of expensive helper/model instance methods.

Build Status

Installation

Composer

{
    "require": {
        ...
        "blainesch/li3_memoize": "dev-master"
        ...
    }
}
php composer.phar install

Submodule

git submodule add git://github.com/BlaineSch/li3_memoize.git libraries/li3_memoize

Clone Directly

git clone git://github.com/BlaineSch/li3_memoize.git libraries/li3_memoize

Usage

Load the plugin

Add the plugin to be loaded with Lithium's autoload magic

In app/config/bootstrap/libraries.php add:

<?php
	Libraries::add('li3_memoize');
?>

Tell it which instance methods to cache

<?php
use li3_memoize\extensions\Memoize;
Memoize::add(array(
	array(
		'name' => 'app\extensions\helper\Prose',
		'method' => array('init')
	),
	array(
		'name' => 'app\models\Users',
		'method' => array('name')
	),
));