Simple, perhaps dumb question: Suppose I have a Java server that stores in memory that I can query the commonly used keys and values (let's say in a Hashmap) < P> What is the difference between that and using Memcache (or even Redis)? Do they store both things in memory? Is there any advantage for one or the other? Is Memcache less than a memory footprint? Can store more in low memory? Fast for the query? There is no difference:
Java memory benefits on memcache:
- Java memory is fast (no network).
- Java memory will not require serialization, you have Java objects available.
Memcache Benefits on Java Maker:
- This can be accessed by more than one application server, so your cache is shared among all your app servers. Will be done.
- This can be accessed by different types of different servers, as long as they agree on all key plans and serialization.
- This will expire expired cache values, so you will get time-based invalidity.
Comments
Post a Comment