Can I create multi hash table?
sgrimm at facebook.com
Wed Sep 27 02:59:00 UTC 2006
可以。You can get the same effect by just putting a prefix in front of
the IDs. So instead of a key of "foo" for a product, you'd use
"product:foo". We do this very successfully with a large number of
different object types.
If you can't do that, then you can also run multiple memcached instances
and fetch different object types from each instance. We actually do a
bit of that as well; we modified our client code to look at the key and
choose from separate lists of servers for certain object types.
(Unfortunately due to some licensing ambiguities in the code we
modified, we can't release those changes.)
> For example, I want to cache person and product information in
> memcached. Their key both are a identify of string type. Can I create
> separate hash table for they in order to avoid a identify of a person
> and a product are equivalent? thanks.
More information about the memcached