-
1. Re: Storing entries in the cache under multiple keys
wdfink Dec 21, 2013 6:26 PM (in response to jugglingcats)1 of 1 people found this helpfulI'm not sure about your the use-case, just sharing my thoughts
From the technical side there might have a performance problem if you access the cache remote as you need two invocations.
On the other hand side if you have local access and you use a distrubuted cache (only a couple of instances store the cache do save memory) the secondary and main cache object might stored on different instances and there is a remote access to retrive the entry.
If you store the same Java Object with different Keys you might spend memory.
You might use a transactional cache to avoid different objects for the same secondary/main key
-
2. Re: Storing entries in the cache under multiple keys
rhusar Dec 23, 2013 7:18 AM (in response to wdfink)+1
In which case, is the 'normal' practice to store a lightweight object in the secondary cache pointing to the primary cache key, ie:
I don' think it's a typical practice, but the consistency concern is solvable by transactions.