Dache is a highly scalable, efficient, well-performing distributed caching system developed for and in the .NET framework.
C# JavaScript Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.nuget Enabled NuGet package restore Jul 27, 2014
Dache.Board Enabled NuGet package restore Jul 27, 2014
Dache.CacheHost Upgraded SharpMemoryCache and SimplSockets; bumped assembly version t… May 1, 2016
Dache.CacheHostService Fixed bug with console host using event viewer logger instead of text… Dec 17, 2014
Dache.Client Upgraded SharpMemoryCache and SimplSockets; bumped assembly version t… May 1, 2016
Dache.Core Set DacheSessionStateProvider to use DebugLogger Jul 9, 2015
Dache.PerformanceTests Add 1ms sleep per 1000 iterations of infinite add test to help not ov… May 1, 2016
Dache.Tests Created JsonSerializer; Added tests for ProtoBufSerializer and JsonSe… Jul 9, 2015
.gitignore Updated .gitignore to exclude Dache compiled output folder Dec 4, 2014
Dache.sln Enabled NuGet package restore Jul 27, 2014
INDIVIDUAL.txt
LICENSE.txt Upgraded SimplSockets Nov 12, 2014
README.md Upgraded SharpMemoryCache and SimplSockets; bumped assembly version t… May 1, 2016
SharedAssemblyInfo.cs Upgraded SharpMemoryCache and SimplSockets; bumped assembly version t… May 1, 2016
TODO.txt Updated TODO Dec 11, 2014

README.md

DACHE

Distributed caching for .NET applications

Fast, scalable distributed caching with meaningful performance metrics for your managers and a simple API for your development team

WEB: http://www.dache.io

EMAIL: info@dache.io

NUGET: Dache.Client and Dache.CacheHost

DOWNLOAD: http://www.dache.io/download

WIKI: http://www.github.com/ironyx/dache/wiki

VERSION INFORMATION

1.6.1

  • Client: Minor performance improvements
  • Cache Host: Minor performance improvements
  • Performance Tests: Updated Infinite Add test to insert 1ms sleep every 1000 adds (helps with infinite loop CPU contention that was sometimes overloading outgoing Socket send buffer)
  • Performance Tests: Changed all tests to use ProtoBuf-Net serializer. It's faster and better than BinarySerializer, and a much better demonstration of the speed and performance of Dache
  • Upgraded SimplSockets to 1.4.7 which provides performance and memory optimizations at the TCP socket level

INSTALLATION INSTRUCTIONS

Getting started quickly involves standing up the Dache Client and a Dache Host for the client to communicate with.

Client

The Dache Client is a single DLL which you reference in any application which you would like to use Dache with. You have 2 options for installing the Dache Client:

NuGet Client

Install the Dache Client via NuGet. Your web.config or app.config will be automatically modified to include the default Dache client configuration:

<configuration>
  <configSections>
    <section name="cacheClientSettings"
      type="Dache.Client.Configuration.CacheClientConfigurationSection, Dache.Client"/>
  </configSections>
  <cacheClientSettings>
    <cacheHosts>
      <add address="localhost" port="33333" />
    </cacheHosts>
  </cacheClientSettings>
</configuration>

Next, instantiate the CacheClient:

// Using the settings from app.config or web.config
var cacheClient = new Dache.Client.CacheClient();

or

// Using programmatically created settings
var settings = new CacheClientConfigurationSettings { ... };
var cacheClient = new Dache.Client.CacheClient(settings);

A file called CacheProvider.cs will also be installed at the root of your project. It is a working example of using the CacheClient and is intended for experimentation and getting a quick-start with Dache. You can build on top of this implementation or discard it completely. The purpose of it is to show you how to use the Dache client in your code.

Manual DLL Reference

To install and the Dache Client manually, first download the binaries from http://www.dache.io/download and then copy the files located in the Client folder to your solution's folder structure. Then, add a reference to Dache.Client.dll to your project.

Next, instantiate the CacheClient as demonstrated above. You'll also need to include the configuration above in your app.config or web.config file.

Client Notes And Next Steps

CacheClient is intended to be used as a singleton. Do not create a new CacheClient per request.

IMPORTANT: all clients should be configured with the same list of servers. The list of servers does not have to be in the same order, but each client's list should contain the same servers.

To learn more about using Dache, check out the wiki.

Host

The host is the actual process that does the caching work. You have 3 options for hosting Dache:

Quick And Easy Console Host

To use the console host, first download the latest release and then run (or double click) CacheHost/Dache.CacheHost.exe. A console will open that verifies the Dache settings and then gives you information about Dache as it is used.

Windows Service

To install and use the provided Windows service, first download the binaries from http://www.dache.io/download and then run CacheHost/install.bat. You will be offered custom installation settings, including the ability to rename the service if you want to install multiple Dache hosts on a single server under unique names.

After successful installation, you can run the service from Windows Services.

To uninstall Dache, run CacheHost/uninstall.bat.

Host In Your Own Process

To host Dache in your own process, install the Dache Host via NuGet. Your web.config or app.config will be automatically modified to include the default Dache host configuration:

<configuration>
  <configSections>
    <section name="cacheHostSettings"
      type="Dache.CacheHost.Configuration.CacheHostConfigurationSection, Dache.CacheHost"
      allowExeDefinition="MachineToApplication" />
  </configSections>
  <cacheHostSettings port="33333" />
</configuration>

Next, instantiate the CacheHostEngine:

// Using the settings from app.config or web.config
var cacheHost = new Dache.CacheHost.CacheHostEngine();

or

// Using programmatically created settings
var settings = new CacheHostConfigurationSettings { ... };
var cacheHost = new Dache.CacheHost.CacheHostEngine(settings);

Host Notes And Next Steps

To learn more about using Dache, check out the wiki.

LICENSE INFORMATION

Dache software is dual licensed. You must choose which license you would like to use Dache under from the following 2 options:

The GNU General Public License Version 3 available for review at http://www.gnu.org/copyleft/gpl.html

-or-

The Commercial Dache License, which must be purchased directly from Imperative Bytes, LLC - the Limited Liability Company which owns the Dache source code. You may purchase the Commercial Dache License by contacting us at info@dache.io.

Please see LICENSE.txt for more information.

IMPORTANT NOTE TO SOURCE CODE CONTRIBUTORS

In order to clarify the intellectual property license granted with Contributions from any person or entity, Imperative Bytes, LLC. ("Imperative Bytes") must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms of the Dache Individual Contributor License Agreement (located in INDIVIDUAL.txt). This license is for your protection as a Contributor as well as the protection of Imperative Bytes; it does not change your rights to use your own Contributions for any other purpose. If you have not already done so, please complete, scan, and e-mail an original signed Agreement to info@dache.io.