Weakrefs and object caching

Hi,

i need to memorize in a Cache some object that i identify through a
attribute my_id.
base on some event i update the attributes of the objects in the cache
and when the processing is done i can remove the object from cache.

I found some solution:

The memoizable library that can serialize/deserialize object in memory
or in a file.

then the Weakrefs of ruby stdlib, in particular i've found this link:

http://eigenclass.org/hiki.rb?weakhash+and+weakref

For performance reasons and whatever what do you advise me to do?
examples,solutions, useful link?

thank you

:tele

I wrote a fair amount about memoization in this blog post, including a full implementation and a weak reference cache:

Hope that helps.

James Edward Gray II

···

On Oct 5, 2006, at 3:22 AM, tele wrote:

For performance reasons and whatever what do you advise me to do?
examples,solutions, useful link?

really interesting!
i've a look

thank you

···

On Thu, 2006-10-05 at 22:14 +0900, James Edward Gray II wrote:

On Oct 5, 2006, at 3:22 AM, tele wrote:

> For performance reasons and whatever what do you advise me to do?
> examples,solutions, useful link?

I wrote a fair amount about memoization in this blog post, including
a full implementation and a weak reference cache:

Gray Soft / Not Found
memoization

Hope that helps.

James Edward Gray II