Поділитися через


Configuring a Cache Client

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 Microsoft AppFabric 1.1 for Windows Server. 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

See Also

Concepts

Application Configuration Settings (AppFabric 1.1 Caching)
Using Configuration Methods
Cache Clients and Local Cache (AppFabric 1.1 Caching)
AppFabric Caching Configuration Options

Other Resources

Configuring the Cache Client with XML

  2012-09-12