# Package com.google.appengine.api.memcache

Provides fast but unreliable data storage, also accessible via a JCache interface.

See: Description

- Interface Summary
  Interface | Description
  --- | ---
  AsyncMemcacheService | An asynchronous version of `MemcacheService`.
  BaseMemcacheService | Methods that are common between `MemcacheService` and `AsyncMemcacheService`.
  ConsistentErrorHandler | A marker interface to indicate that all `MemcacheServiceException` exceptions should be handled by `ErrorHandler.handleServiceError(MemcacheServiceException)`.
  ErrorHandler | Deprecated Use `ConsistentErrorHandler` instead
  MemcacheService | The Java API for the App Engine Memcache service.
  MemcacheService.IdentifiableValue | Encapsulates an Object that is returned by `MemcacheService.getIdentifiable(java.lang.Object)`.
  Stats | Statistics from the cache, available via `MemcacheService.getStatistics()`

- Class Summary
  Class | Description
  --- | ---
  ConsistentLogAndContinueErrorHandler | Similar to the deprecated `LogAndContinueErrorHandler` but consistently handles all back-end related errors.
  ErrorHandlers | Static utility for getting built-in `ErrorHandler`s.
  Expiration | Expiration specifications on `MemcacheService.putAll(Map , Expiration)` and `MemcacheService.put(Object, Object, Expiration)` operations.
  LogAndContinueErrorHandler | Deprecated Use `ConsistentLogAndContinueErrorHandler` instead
  MemcacheSerialization | Static serialization helpers shared by `MemcacheServiceImpl` and `com.google.appengine.api.memcache.dev.LocalMemcacheService`.
  MemcacheSerialization.ValueAndFlags | Tuple of a serialized byte array value and associated flags to interpret that value.
  MemcacheService.CasValues | A holder for compare and set values.
  MemcacheServiceFactory | The factory by which users acquire a handle to the MemcacheService.
  StrictErrorHandler | A strict error handler, which will throw `MemcacheServiceException` or `InvalidValueException` for any service error condition.

- Enum Summary
  Enum | Description
  --- | ---
  MemcacheSerialization.Flag | Values used as flags on the MemcacheService's values.
  MemcacheService.SetPolicy | Cache replacement strategies for `MemcacheService.put(java.lang.Object, java.lang.Object, com.google.appengine.api.memcache.Expiration, com.google.appengine.api.memcache.MemcacheService.SetPolicy)` operations, indicating how to handle putting a value that already exists.

- Exception Summary
  Exception | Description
  --- | ---
  InvalidValueException | Thrown when a cache entry has content, but it cannot be read.
  MemcacheServiceException | An exception for backend non-availability or similar error states which may occur, but are not necessarily indicative of a coding or usage error by the application.

## Package com.google.appengine.api.memcache Description

Provides fast but unreliable data storage, also accessible via a JCache interface. Objects may be stored in the cache with an explicit expiration time, but may also be evicted before that expiration to make room for newer, more active entries.

The cache is accessed via a `MemcacheService` object, obtained from the `MemcacheServiceFactory`. It offers the cache as a map from key `Object` to value `Object`.

In the Development Server, the system property `memcache.maxsize` can be set to limit the available cache, taking values like "100M" (the default), "10K", or "768" (bytes).

Because the cache offers best-effort data storage, by default most errors are treated as a cache miss. More explicit error handling can be installed via `MemcacheService.setErrorHandler(ErrorHandler)`.

See Also:
  `MemcacheService`, The Memcache Java API in the Google App Engine Developer's Guide., JCache API