This project is read-only.


Nov 18, 2011 at 9:42 AM

I have looked everywhere but am unable to find any documentation on how to use the nmemcached.client Config section. It should be easy but haven't been able to get it working.

I figured the app.config should look something like this:

<?xml version="1.0"?>
    <section name="nmemcached.client" type="NMemcached.Client.Configuration.ConfigSection" allowLocation="true" allowDefinition="Everywhere"/>

    <add server="" port="11211" useCompression="true"/>

But then how do I proceed? How do I get a MemcachedClient configured with the values from my app.config?

  1. Is my app.config section correct? If not; where did I go wrong
  2. What would be the correct way tot instantiate a MemcachedClient object?

Thanks for the great project!

Dec 7, 2011 at 5:36 PM
Edited Dec 7, 2011 at 6:02 PM

Sorry for the lengthy delay in the response, I have not been able to check up on this project for a little while.

I am in the process of creating the documentation page for the configuration. For now, here are the changes that need to be made to the configuration above to get it working:

  • The type in the section name should be "NMemcached.Clent.Configuration.NMemcachedConfigurationSection, NMemcached.Client". The client assembly must be specified so the configuration system knows where to find the section handler.
  • The <add /> elements must be within a <connectionProvider> element under the <nmemcached.client> element.

The modified configuration will look like this:

    <section name="nmemcached.client" type="NMemcached.Client.Configuration.NMemcachedConfigurationSection, NMemcached.Client" allowLocation="true" allowDefinition="Everywhere"/>
    <add server="" port="11211" useCompression="true"/>

Call the MemcachedClient.Create method to get the client that uses the configuration file.

On a side note, an XSD is in the project that was included specifically for intellisense. Add the XSD to the <VSInstallDirectory>\Xml\Shemas and include xmlns="" in the nmemcached.client element.

Dec 14, 2011 at 2:50 PM
Edited Dec 14, 2011 at 8:43 PM

You're my hero! Works like a charm (altough I seem to run into a problem with compression).