2017 © Pedro Peláez
 

library object-cache

An object cache that will seamlessly cache all method calls to an object

image

michaelesmith/object-cache

An object cache that will seamlessly cache all method calls to an object

  • Friday, September 6, 2013
  • by michaelesmith
  • Repository
  • 1 Watchers
  • 1 Stars
  • 49 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

README

What is it?

An object cache that will seamlessly cache all method calls to an object. Basically it will mimic an object caching method calls made to it. This is probably most useful in dependency injection. One caveat, a method called with the same parameters is expected to always return the same value., (*2)

Installation

The recommended way to install msDateTime is through composer., (*3)

If you don't have Composer yet, download it following the instructions on http://getcomposer.org/ or just run the following command:, (*4)

curl -s http://getcomposer.org/installer | php

Just create a composer.json file for your project:, (*5)

json { "require": { "michaelesmith/object-cache": "*" } }, (*6)

For more info on composer see https://github.com/composer/composer, (*7)

Examples

Basic

$object = ...;
$cache = new \Doctrine\Common\Cache\ArrayCache();
$oc = new ObjectCache($object, $cache);
// use $oc as usual and methods will only be called once

The Versions

06/09 2013

dev-master

9999999-dev https://github.com/michaelesmith/ObjectCache

An object cache that will seamlessly cache all method calls to an object

  Sources   Download

MIT

The Requires

 

cache