Quantcast
Viewing all articles
Browse latest Browse all 7

Answer by Alex for Memcached best practices - small objects and lots of keys or big objects and few keys?

I would say lots of little keys. This way you can get the exact result you want in 1 call with minimal serialization effort.

If you store it in another object (an array for example) you will have to fetch the array from cache and then fetch the item you actually want again from that array, plus you have the overhead of serializing/deserializing the whole complex object again. Depending on your language of choice this might mean manually writing a serialization/deserialization function from scratch.


Viewing all articles
Browse latest Browse all 7

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>