ides has asked for the wisdom of the Perl Monks concerning the following question:
Hi everyone, had a question rolling around in my head for a few days now and I can't seem to come up with a good solution and am looking for suggestions.
If a person were to implement Inside Out classes as described in Conway's Perl Best Practices, how does one implement caching of the individual objects with something like Cache::FastMMap or Cache::Memcached?
Because of the nature of the inside out object, it is just a unique indentifier and caching it isn't very useful, the associated data is what needs to be cached.
What I'm looking for specifically is not so much to avoid the cycles creating the object, but to avoid unnecessarily hitting a database or other storage to retrieve the data if it is cached.
Any ideas?
Frank Wiles <frank@wiles.org>
http://www.wiles.org
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Inside Out Classes with caching
by perrin (Chancellor) on Sep 19, 2005 at 17:17 UTC | |
by diotalevi (Canon) on Sep 19, 2005 at 17:30 UTC | |
by xdg (Monsignor) on Sep 19, 2005 at 18:42 UTC | |
by perrin (Chancellor) on Sep 19, 2005 at 18:53 UTC | |
by ides (Deacon) on Sep 19, 2005 at 17:23 UTC | |
|
Re: Inside Out Classes with caching
by adrianh (Chancellor) on Sep 22, 2005 at 08:21 UTC |