Gets a handle to the cache service, forcing use of specific namespace.
Although there is only one actual cache, an application may make as many
MemcacheService instances as it finds convenient. If using multiple instances, note
that the error handler established with MemcacheService#setErrorHandler(ErrorHandler)
is specific to each instance.
if not null forces the use of namespace
for all operations in MemcacheService . If namespace is
null - created MemcacheService will use current namespace
provided by com.google.appengine.api.NamespaceManager#get().
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003eIMemcacheServiceFactory is the designated factory for acquiring a handle to the MemcacheService.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetAsyncMemcacheService(String namespace)\u003c/code\u003e method retrieves an asynchronous version of the cache service, using the specified namespace.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetMemcacheService(String namespace)\u003c/code\u003e method obtains a handle to the cache service, allowing forced use of a specific namespace.\u003c/p\u003e\n"],["\u003cp\u003eWhen using the \u003ccode\u003egetMemcacheService\u003c/code\u003e method, providing a null \u003ccode\u003enamespace\u003c/code\u003e will lead to the MemcacheService using the current namespace from \u003ccode\u003eNamespaceManager#get()\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Interface IMemcacheServiceFactory (2.0.0)\n\n public interface IMemcacheServiceFactory\n\nThe factory by which users acquire a handle to the MemcacheService.\n\nMethods\n-------\n\n### getAsyncMemcacheService(String namespace)\n\n public abstract AsyncMemcacheService getAsyncMemcacheService(String namespace)\n\nSimilar to [#getMemcacheService(String)](/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.memcache.IMemcacheServiceFactory#com_google_appengine_api_memcache_IMemcacheServiceFactory_getMemcacheService_java_lang_String_) but returns a handle to an\nasynchronous version of the cache service.\n\n### getMemcacheService(String namespace)\n\n public abstract MemcacheService getMemcacheService(String namespace)\n\nGets a handle to the cache service, forcing use of specific namespace.\n\nAlthough there is only one actual cache, an application may make as many\n`MemcacheService` instances as it finds convenient. If using multiple instances, note\nthat the error handler established with MemcacheService#setErrorHandler(ErrorHandler)\nis specific to each instance."]]