New extension: memoize
| From: | Arpad Ray | Date: | Mon, 20 Jun 2011 00:45:16 +0000 |
| Subject: | New extension: memoize | ||
| Groups: | php.pecl.dev | ||
| Request: | Send a blank email to pecl-dev+get-8378@lists.php.net to get a copy of this message | ||
Hi,
This extension provides transparent caching of functions by their
arguments, much like Perl's memoize module.
It works by replacing the function entry with an internal function
which hashes: the function name, arguments, the object if there is
one, and an optional namespace from an ini setting. It provides three
storage modules: "memory" which uses a per-request hashtable, "apc"
and "memcached".
I gather that at the moment there's no support for one package
providing multiple extensions, so this would need to go into four
different packages.
The code can be found at: https://github.com/arraypad/php-memoize
I'd like to publish this extension in PECL if it looks alright to
everyone, and I'd appreciate any feedback.
Regards,
Arpad