Returns the cache client, an instance of the DataCache object.
Namespace: Microsoft.ApplicationServer.Caching Assembly: Microsoft.ApplicationServer.Caching.Client (in microsoft.applicationserver.caching.client.dll)
The cache client returned by this method can be configured programmatically, or by the application configuration file. When a DataCacheFactoryConfiguration parameter is passed to the DataCacheFactory class constructor, those configuration settings are used for all cache clients obtained from that DataCacheFactory object. Configuration parameters passed to the constructor override settings specified in the application configuration file. If no parameters are provided to the DataCacheFactory class constructor, the cache client configuration parameters come from the application configuration file. For more information about configuration options and settings for the cache client, see Configuration (Windows Server AppFabric Caching).
Before working with the cache, you must first create the named cache with the New-Cache command of the PowerShell based cache administration tool. Cache names are case sensitive; make sure that the case of the specified cache is the same as shown with the Get-Cache command. Use the Get-Cache command without passing any parameters to find out which caches are present in the cluster. For more information, see Cache Administration with PowerShell (Windows Server AppFabric Caching).