Closed mkubala closed 11 years ago
Hi, @mkubala
Thank you for the pull request! I have just merged it.
I totally agree with your opinion about ignoring empty keys and avoid exceptions.
I think that the default - Ehcache - implementation is, essentially, a reference implementation for all the CacheAPI implementations including play2-memcached, since I also believe many people seem to not test their applications/plugins with implementations other than the default, as you pointed out too!
Thanks
mumoshu
Currently when you try to obtain/set/remove cached value for an empty key you will get following exception:
I discover that some plugins (for example SecureSocial) which uses CacheAPI seems to be not tested with other implementation than default (Ehcache).
In my opinion it will be better to ignore empty keys and avoid exception. I'm aware that since CacheAPI does not establish any kind of 'cache keys contract' it is hard to determine who is responsible for guarding keys (client or concrete cache api implementation?) so do with this pull request what you want ;)