1 of 1 people found this helpful
I'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
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.