Re: Function Cache
| From: | Stig S. Bakken | Date: | Mon, 11 Dec 2000 09:37:56 +0000 |
| Subject: | Re: Function Cache | ||
| References: | 1 2 3 | Groups: | php.pear |
| Request: | Send a blank email to php-pear+get-641@lists.php.net to get a copy of this message | ||
Sebastian Bergmann wrote:
>
> "Stig S. Bakken" wrote:
> > For objects, I think the best thing would be to create a function that
> > returns a proxy object. Then you can write code like this:
> >
> > $obj = new myclass(42);
> > $cached = new caching_proxy_object($obj);
> >
> > ...from this point, $cached can be used exactly like $obj (all variable
> > and method accesses go through the proxy object). A storage model
> > similar to ext/session could be adapted, at the very least you should
> > have "user" (maybe more constructor parameters with callback function
> > names).
>
> Interesting idea. So, I'm going to remove the functionality to cache
> method calls from my current implementation and use it just for caching
> functions.
>
> Should we create a new top level folder "Cache"?
Yeah.
- Stig