|
|
> Using explicit namespace => 'prefix' is different from adding 'prefix'
> by hand: namespace string is not hashed along with the key, thus keys
> are distributed among servers differently. But if all parts of your
> application agree to use the same approach, then go ahead, hashing
> (C::M::F uses CRC32) is fast enough, so additional 16-32 bytes won't
> make a noticeable slowdown.
Good to know. I think it should be more clear in documentation (does
Cache::Memcached work also this way?) cause someone could think he can
use both interchangeably.
Another problem with manually adding prefixes is that you also have to
remove them in the result of *_multi. A good solution would be to change
the value of namespace before each call to get/set. I guess this is not
currently possible, right? It would be a good idea to add it in a future
version (so that you can reuse the same object (and its connections) for
different namespaces).
Kostas
|
|