Client Configuration Options (Windows Server AppFabric Caching)
Selecting the cache client configuration options that are right for your application and cache cluster may depend on several factors when you are using the caching features of Windows Server AppFabric. This section describes ways that you can specify the cache client configuration settings and what is involved with each method.
Selecting Client Configuration Options
Specifying cache client configuration settings programmatically may be the best choice if configuration options will change while the application is running. For example, you may want to enable local cache for some parts of your application but not use it in others. Also, you may not want to add an application configuration file to your application if there is otherwise no need for one.
Using an application configuration file to specify cache client configuration options may be the best choice if some parameters may change after the application is compiled. For example, if the names of some of your cache hosts change, you only have to update and resave the client configuration file. If you specify those settings programmatically, you must recompile your application.
Because programmatic configuration of the cache client overrides the XML settings, you may also want to take a hybrid approach. Settings in the application configuration file could be treated as your application's default and you could override those settings with programmatic configuration. Whether or not you set them programmatically depends on whether or not you provide configuration parameters to the constructor of the DataCacheFactory class.
The topics in this section provide details about what is involved in each of the client configuration options.
In This Section
Application Configuration Settings (Windows Server AppFabric Caching)
Using Configuration Methods (Windows Server AppFabric Caching)
Cache Clients and Local Cache (Windows Server AppFabric Caching)
Windows Server AppFabric Caching Configuration Options