Configuration Model (Windows Server AppFabric Caching)

Windows Server AppFabric supports many cache configurations. Configuration details are specified at three levels: in the application, in the cache host, and in the cache cluster.

Application Configuration

Each cache-enabled application must have its cache client configured in order to use the cache cluster. You can do this programmatically in application code or by specifying it in an application configuration file that you add to your Visual Studio project. If you do both, settings specified in application code take precedence over the application configuration file settings.

The application configuration settings identify which cache hosts should be contacted in order to communicate with the cache cluster. The application settings are also used to enable local cache. For more information, see Application Configuration Settings (Windows Server AppFabric Caching).

Cache Host Configuration

Each cache host uses a configuration file that is named DistributedCacheService.exe.config. This file is automatically created and configured when the Cache Service is installed on the cache server. The DistributedCacheService.exe.config file is used to store settings that are required for the software to run. For more information, see Cache Host Configuration Settings (Windows Server AppFabric Caching).


When you use a SQL Server database to store cluster configuration settings, the SQL Server connection string is stored in clear text in the DistributedCacheService.exe.config file. Whenever possible, use Windows integrated security to secure the database so that passwords are not required in connection strings.

Cluster Configuration

All cache hosts in the cluster need access to the cluster configuration storage location. The cluster configuration information specifies settings for the cache hosts and named caches. The cluster configuration details are first established during the installation of the first cache host, and are automatically updated with subsequent installations.

There are three storage options available for cluster configuration information. As seen in the following table, cluster configuration settings can be stored in a shared network folder, a SQL Server 2005 or later database, or a custom provider.

Storage type Storage location Cluster management

XML file

shared network folder

lead hosts

SQL Server database

SQL Server

SQL Server (default) or lead hosts

Custom provider

custom store

custom store

Choose the option that best meets the needs of your application and infrastructure. For more information, see Cluster Configuration Storage Options (Windows Server AppFabric Caching).

Regardless of the storage option that you choose, you can edit the configuration settings with Windows PowerShell commands: Export-CacheClusterConfig and Import-CacheClusterConfig. For more information, see Configuring the Cache Cluster (Windows Server AppFabric Caching).

See Also


Windows Server AppFabric Caching Configuration Options
Windows Server AppFabric Caching Physical Architecture Diagram
Windows Server AppFabric Caching Logical Architecture Diagram