Re: Proposal: APCu - APC User Cache
| From: | Joe Watkins | Date: | Wed, 27 Mar 2013 11:22:25 +0000 |
| Subject: | Re: Proposal: APCu - APC User Cache | ||
| References: | 1 2 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-10475@lists.php.net to get a copy of this message | ||
On 03/27/2013 11:01 AM, Johannes Schlüter wrote:
On Tue, 2013-03-26 at 11:32 +0000, Joe Watkins wrote:Every part of the APCu API is exposed, and installed. From an external extension, you can do anything, from manipulate the APC cache, to creating caches and even shared memory allocators of your own ! An example of using this new superpower, (I think it's fair to call it a superpower): https://github.com/krakjoe/apcu/blob/simplify/apcue Another example that allows the user, at runtime, to create and configure multiple caches: https://github.com/krakjoe/apcup Both of these examples use a separate allocator to APC (apc_sma), to properly demonstrate how this is done. You can of course interact with apc_sma from an external extension too. Both examples are not examples of polished code, but extensions thrown together to test the functionality of the API and explore some of the possibilities. I have agressively commented and organized the source code of APCu, also updated the TECHNOTES/INSTALL for correctness. It should all make quite a good read, if you're into that sort of thing. The headers you want to read in particular: *_api.h I do hope this gives rise to some pretty cool extensions ... Enjoy :) JoeHi chaps, As some of you know, I have recently stripped APC of opcode caching abilities. Revised it's C API and locking and am preparing to create a PECL release. http://github.com/krakjoe/apcu Any objections ?Seems to be a good idea. An request: IS there a chance to make APIs like apc_cache_store() exported, stable (PHP|APC_)API function which could be used by other extension to check/preload/... the cache? johannes Morning Johannes,