Skip to content
A configuration object for Enyim's MemcachedClient that enables the use of Amazon ElastiCache's Auto Discovery feature
Branch: master
Clone or download
Latest commit 30996c7 Oct 20, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.nuget Clean up App.config in test app Oct 24, 2014
Amazon.ElastiCacheCluster Version Bump Oct 20, 2017
ClusterClientAppTester Clean up App.config in test app Oct 24, 2014
LocalSimulationTests
packages
.gitattributes
.gitignore Initial commit to add default .gitIgnore and .gitAttribute files. Jul 1, 2014
ElastiCacheClusterConfig.sln Make DiscoveryNode act as if there are no nodes in the cluster when r… Oct 3, 2014
LICENSE.txt
NOTICE.txt Licensing complete. Jul 30, 2014
README.md Update README.md with a sample App.config Oct 29, 2014

README.md

Amazon ElastiCache Cluster Configuration for .NET

Amazon ElastiCache Cluster Configuration is an enhanced .NET library that supports connecting to an Amazon ElastiCache cluster for Auto Discovery. This client library is an extension built upon Enyim and is released under the Apache 2.0 License.

Usage

To use Amazon ElastiCache with Auto Discovery, the ElastiCacheClusterConfig object must be passed to the MemcachedClient object. An ElastiCacheClusterConfig can be created from the App.config if there is a clusterclient section or you can pass a different section.

var client = new MemcachedClient(new ElastiCacheClusterConfig());

ElastiCacheClusterConfig can also be instantiated by providing it an AutoConfigSetup or simply provide the hostname and port like so:

var client = new MemcachedClient(new ElastiCacheClusterConfig("hostname", 11211));

Once instantiation occurs in this way, MemcachedClient can be used the same way as the Enyim Client. The only difference is a background process polls the cluster and updates nodes when changes occur.

App.config

The ElastiCacheClusterConfig object can be configured from an application's App.config file. Here is a sample App.config that configures the Amazon ElastiCache configuration URL and the polling interval at which the client will check for changes to the cluster.

<clusterclient>
  <endpoint hostname="my-configuruation-url.cache.amazonaws.com" port="11211" />
  <poller intervalDelay="60000" />
</clusterclient>

The rest of the app.config configuration items for Enyim can be found here.

Enyim Client

Because this binary is used as a configuration object for the Enyim MemcachedClient, usage beyond instantiation is all exactly the same so refer to this wiki or this google group on how to use the actual client.

Wiki

The wiki found here goes into more detail on the usage of the ElastiCacheClusterConfig object as well as how the project takes advantage of Auto Discovery.

Requirements

You'll need .NET Framework 3.5 or later to use the precompiled binaries. To build the client, you'll need Visual Studio 2010 or higher.

You can’t perform that action at this time.