# Interface IMemcacheServiceFactory (5.0.3)

    public interface IMemcacheServiceFactory

The factory by which users acquire a handle to the MemcacheService.

## Methods

### getAsyncMemcacheService(String namespace)

    public abstract AsyncMemcacheService getAsyncMemcacheService(String namespace)

Similar to [#getMemcacheService(String)](https://docs.cloud.google.com/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
asynchronous version of the cache service.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `namespace` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.memcache.AsyncMemcacheService` |   |

### getMemcacheService(String namespace)

    public abstract MemcacheService getMemcacheService(String namespace)

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.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `namespace` | `https://docs.oracle.com/javase/8/docs/api/java/lang/String.html` 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()](https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.NamespaceManager#com_google_appengine_api_NamespaceManager_get__). |

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://docs.cloud.google.com/appengine/docs/standard/java-gen2/reference/services/bundled/latest/com.google.appengine.api.memcache.MemcacheService` | a new `MemcacheService` instance. |