Memcached uses a hash inside to have an O (1) lookup - it is designed to do the most complex work possible.
As for caching, big or small, this is really what you need to save, it will save you strength (bearing in mind the big stupid cache, you need to help maintain synchronization if you change one part, which is also mentioned elsewhere). On the original site, it was written for Livejournal.com, the biggest block that made sense was one complete journal entry - like ready-made HTML that anyone who was allowed to see this particular post could use it.
I used it for very small records - literally one number with a participant identifier, but I generate several thousand such en-mass records with one database query, and not one at a time as required.
You can optimize the daemon a bit if you know that you will only store very large or very small elements, but for many small records it has enough skills to divide empty large memory plates into smaller pieces for use.
Alister bulman
source share