Share via


Read-Through and Write-Behind (AppFabric 1.1 Caching)

Microsoft AppFabric 1.1 for Windows Server provides the architecture to create and use read-through and write-behind providers. These providers provide integration with a backend store, such as a database. To create a read-through or write-behind provider, you must create an assembly that implements the DataCacheStoreProvider abstract base class. The assembly is then associated with a cache using new parameters of the New-Cache and Set-CacheConfig Windows PowerShell commands.

Read-Through

If an item doesn't exist in the cache, a call to DataCache.Get will return null. In the cache-aside programming model, the caller is responsible for then loading the data from a backend store and then putting that data in the cache. With a read-through provider, the cache detects the missing item and calls the provider to perform the data load. The item is then seamlessly returned to the cache client.

Write-Behind

In the same way, items that are added or updated in the cache can be periodically written to the backend store using a write-behind provider. This happens asynchronously and on an interval defined by the cache.

See Also

Concepts

Creating a Read-Through / Write-Behind Provider (AppFabric 1.1 Caching)

  2012-09-12