Hi,

Please help me structure the cache to store instances of a type, say T.
I'd like to cache the objects in two different ways:

1. By a unique key (k1), where the value is a single instance
2. By a non-unique key (k2), where the value is a list of instances

Please comment on my approach:

- Create a cache with k1 to an instance of T.
- Create a second cache with k2 to a list of k1 keys.
- To add a new instance of T, I will have to update both caches. Will this 
result in serializing the instance (in the first cache) and the list of keys 
(in the send cache)? -- Assume not on-heap.
- If so, will each addition/deletion re-serialize the entire list in the second 
cache?

Thank you!
Ramin

Reply via email to