mumoshu/play2-memcached

Readme unclear regarding namespacing

rethab opened this issue · 1 comments

The readme shows the following configuration (among others):

play.modules.cache.defaultCache=default

and then goes on to say that the namespace is empty by default and may be set with the following key

memcached.namespace=mikoto.

Looking at the code (and running an application based on this lib) however suggests that the key memcached.namespace is never read and namespace will be taken from the key play.modules.cache.defaultCache which essentially means if people are following this readme, they'll end up with a namespace called default.

I came across this issue since securesocial uses quite large keys and already provides the idLengthInBytes to restrict them, however this namespace lead to another KeyTooLongException during the migration to play 2.4.

hayd commented

I also found this unclear (I was unable to find key/values set in play from another app), thanks for this issue it makes sense. I found them as s"default${key}".

however suggests that the key memcached.namespace is never read

See also #41 . Note: the name "defaultCache" is confusing... when it's really "cachePrefix".

NOTE: To configure override play.cache.defaultCache.