MediaWiki  1.28.0
ArrayBackedMemoizedCallable Class Reference

A MemoizedCallable subclass that stores function return values in an instance property rather than APC or APCu. More...

Inheritance diagram for ArrayBackedMemoizedCallable:
Collaboration diagram for ArrayBackedMemoizedCallable:

Protected Member Functions

 fetchResult ($key, &$success)
 
 storeResult ($key, $result)
 
- Protected Member Functions inherited from MemoizedCallable
 fetchResult ($key, &$success)
 Fetch the result of a previous invocation from APC or APCu. More...
 
 storeResult ($key, $result)
 Store the result of an invocation in APC or APCu. More...
 

Private Attributes

 $cache = []
 

Additional Inherited Members

- Public Member Functions inherited from MemoizedCallable
 __construct ($callable, $ttl=3600)
 Constructor. More...
 
 invoke ()
 Invoke the memoized function or method. More...
 
 invokeArgs (array $args=[])
 Invoke the memoized function or method. More...
 
- Static Public Member Functions inherited from MemoizedCallable
static call ($callable, array $args=[], $ttl=3600)
 Shortcut method for creating a MemoizedCallable and invoking it with the specified arguments. More...
 

Detailed Description

A MemoizedCallable subclass that stores function return values in an instance property rather than APC or APCu.

Definition at line 6 of file MemoizedCallableTest.php.

Member Function Documentation

ArrayBackedMemoizedCallable::fetchResult (   $key,
$success 
)
protected

Definition at line 9 of file MemoizedCallableTest.php.

References $success, and cache.

ArrayBackedMemoizedCallable::storeResult (   $key,
  $result 
)
protected

Definition at line 18 of file MemoizedCallableTest.php.

References cache.

Member Data Documentation

ArrayBackedMemoizedCallable::$cache = []
private

Definition at line 7 of file MemoizedCallableTest.php.


The documentation for this class was generated from the following file: