There is no license information available for the latest version (v0.2.1) of this package.

A magic memoization function on steroids

v0.2.1 2019-12-23 21:06 UTC

This package is auto-updated.

Last update: 2022-07-25 12:40:38 UTC


A magic memoization function on steroids.


Memoization stores the results of expensive function calls and returns the cached result when the same inputs occur again.

This library stores the result of a function. If any of the function's argument are files or folders, the result will be deemed as valid until any of those files or folders are either modified or removed.

Any function which involves I/O is destined to be slow, that's why Memorandum speeds up things by processing things only when necessary.



$function = memo(function($file) {
    return 'cached ouptut:' . $file;

$result = $function(__DIR__);
$result = $function(__DIR__);
// The function would be called once, and the output
// will be remembered until a new file is added to __DIR__
// or another file is removed.