Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Overview

This StorageService, identified by type="MEMCACHE", stores data in one or a cluster of http://www.danga.com/memcached servers. The data persists across restarts of the SP itself, and supports shared access across nodes of a cluster. Locking is performed inside the plugin itself. Note that the memcache store itself is volatile so if the memcache servers restart, all the state is lost.

...

Info

Use of this plugin requires that its extension library memcache-store.so be loaded by the Service Provider via the <OutOfProcess> element's <Library> option.

Reference

Attributes

Settings specific to this type include:

Name

Type

Default

Description

prefix 

prefix 

string


String prefix that gets appended to the keys so that there are no key name conflicts when different applications use the same memcache servers.

buildMap 

buildMap 

boolean

false

The memcache store is able to function in two modes: with or without a context map that allows the SP to store more complex data in the system. The SessionCache requires that we keep an additional data structure to deal with such contexts while the ReplayCache and ArtifactMap do not have that need.

sendTimeout 

sendTimeout 

microseconds

 999,999

Sets the timeout used for sending data on the socket.

recvTimeout 

recvTimeout 

microseconds

 999,999

Sets the timeout used for receiving data on the socket.

pollTimeout 

pollTimeout 

milliseconds

1000

Sets the timeout used for polling the socket.

failLimit 

failLimit 

integer

5

Sets the maximum number of errors that can happen when talking to a server before marking it as DEAD.

retryTimeout 

retryTimeout 

seconds

30

Sets the timeout used for trying to use a DEAD server.

nonBlocking 

nonBlocking 

0 or 1

1

Sets the behavior of the memcached lib. Non-blocking mode gives better performance and recovers better from errors.

All StorageService plugin types support the following attributes:

Include Page
StorageServiceCommonAttributes
StorageServiceCommonAttributes

Child Elements

Name

Cardinality

Description

<Hosts>

1

A comma-delimited list of memache hosts.

Example

Code Block
languagexml
<OutOfProcess>
    <Extensions>
        <Library path="memcache-store.so" fatal="true"/>
    </Extensions>
</OutOfProcess>

<StorageService type="MEMCACHE" id="mc" prefix="SERVICE_PREFIX:">
  <Hosts>
    10.135.64.71:11211, 10.135.64.72:11211
  </Hosts>
</StorageService>
 
<StorageService type="MEMCACHE" id="mc-ctx" prefix="SERVICE_PREFIX:" buildMap="1">
  <Hosts>
    10.135.64.71:11211, 10.135.64.72:11211
  </Hosts>
</StorageService>

...