This project is read-only.

Client API

public static T Get<T>(string key)

  • retrieve the item of type T from the cache store
  • returns null if the item is not in the cache or if it has expired
  • throws InvalidCastException if the object in the cache is not of type T

public static void Put(string key, DateTime expiration, object value)

  • issues an asynchronous WCF call to update or add value to the cache

public static void Delete(string key)

  • issues an asynchronous WCF call to remove the item with this key from the cache
  • this call does nothing if this key does not exist in the cache

The client API needs to know what servers are available. To specify this, you will need to add the following to your config file.

  <configSections>
    <section name="NCache" type="NCacheClient.Configuration.NCacheConfigSection, NCacheClient"/>
  </configSections>
  <NCache>
    <NCacheServers>
      <clear />
      <add Host="localhost" Port="8523" />
      <add Host="localhost" Port="8524" />
    </NCacheServers>
  </NCache>
</configuration>

DotNetDCache Server

The DotNetDCache server is made up of 3 parts: the cache, the service, and the service installer.

Service installer

  • Standard windows service installer with service name "DotNetDCacheServer"

WCF service

  • standard WCF service. Security is turned off and the endpoints/bindings can be modified in the app.config.

Performance

  • We don't have too many numbers just yet. Across a standard network we were seeing about 5ms read time for small amounts of data and about 13ms to read cached strings of 64K.

Last edited Mar 26, 2010 at 7:17 PM by ryan_w, version 6

Comments

No comments yet.