blainesch / li3_memoize
Will aid in the caching of expensive helper/model instance methods.
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Type:lithium-library
This package is not auto-updated.
Last update: 2024-11-23 13:07:07 UTC
README
Will aid in the caching of expensive helper/model instance methods.
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') ), ));