Hi,

I have a question about how the disk cache stores objects.

Suppose I have two caches - one for Book objects and one for Bookcase
objects. Bookcase objects can contain collections of Books.

Presumably, in a MemoryCache what are stored are references to objects
on the heap. So, in the Book cache, the values in the cache are pointers
to the memory addresses of the actual Book objects sitting out on the
heap. The Bookcase cache would work the same way. If a Bookcase object
contained some Book objects that also happened to be in the Book cache
as well, the cache for this Bookcase object would contain references to
the same Book memory addresses on the heap. In other words, we wouldn't
have duplicates of the same Book objects in both caches, only duplicates
of their references or pointers.

Now if the contents of both caches get serialized to the same disk cache
will we have a similar "duplicate-free" storage of each cache's object
graph? Will Books contained by a Bookcase object be simply be pointers
to the same Book addresses that are in the serialized Book cache? Or
will the contents of the Bookcase cache and the Book cache be
independent of one another? In other words, would it be possible to have
duplicates of a particular Book in the disk cache?

Thanks for any insight.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to