tags:

views:

11

answers:

1

The general pattern for storing data in memcached seems to be to store lists of ids, and then use multiget to retrieve the individual objects.

But how are people dealing with caching large lists of ids, say the ids of the users in a group, when the list could be up to 10000 ids?

I've thought about a strategy of splitting the list up in multiple pages of say 100 ids. This would allow me to retrieve item 75-125 by getting 2 pages of 100 ids.

Can anyone see something wrong in this approach or direct to any resources dealing with this issue?

/Thanks!

A: 

10,000 64-bit IDs is 80k and very likely compresses quite well. You'd have to have very large groups before this matters.

Dustin