HOME

TheInfoList



OR:

AppFabric Caching provides an in-memory,
distributed cache In computing, a distributed cache is an extension of the traditional concept of cache used in a single locale. A distributed cache may span multiple servers so that it can grow in size and in transactional capacity. It is mainly used to store appl ...
platform for
Windows Server Windows Server (formerly Windows NT Server) is a group of operating systems (OS) for servers that Microsoft has been developing since July 27, 1993. The first OS that was released for this platform was Windows NT 3.1 Advanced Server. With the r ...
.
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
developed AppFabric Caching and released it as part of AppFabric.


Architecture

AppFabric Caching stores serialized managed
objects Object may refer to: General meanings * Object (philosophy), a thing, being, or concept ** Object (abstract), an object which does not exist at any particular time or place ** Physical object, an identifiable collection of matter * Goal, an ...
in a cache cluster. The cache cluster consists of one or more machines that pool their available physical memory. This pooled memory is presented to cache clients as a single source of caching memory. Objects are stored and accessed using an associated key value. AppFabric Caching features must be installed on each server in the cache cluster. Following installation, the AppFabric Configuration Wizard must be used to join each server to the cache cluster. An external file share or database is required to maintain the cache cluster configuration settings. A set of
Windows PowerShell PowerShell is a task automation and configuration management program from Microsoft, consisting of a command-line shell and the associated scripting language. Initially a Windows component only, known as Windows PowerShell, it was made open-sourc ...
commands for Caching provides administration capabilities on the cache cluster.


Code examples

''Note that the code samples in this section are shown in C#.'' A common task is to create code that puts, retrieves, and removes objects from the cache. These operations target either the default cache or a named cache. First, create a static DataCache member: public static DataCache _cache; Next, create a method that accesses this cache. The properties of the cache can be stored in the app.config or web.config files. The cache settings can also be programmatically configured. The following example shows how to programmatically configure the cache. public static DataCache GetCache() The following method shows how to use the ''_cache'' object to retrieve data from the cache. In this example, a user identifier (''userId'') is the key for the associated user information object. The code first attempts to get this user information from the cache using the ''userId'' key. If that does not succeed, the code retrieves the information with a database query and then stores the returned user data in the cache. The next time the same code is run, the user information will be returned from the cache rather than the database. This assumes that the cached data has not been expired or evicted. dataType GetUserData(string userId) The following method shows how to update data that is already in the cache. void UpdateUserData(string userId, dataType data) The following call removes the item from the cache. _cache.Remove(userId);


History

Originally, AppFabric Caching had several beta releases under the
code name A code name, call sign or cryptonym is a code word or name used, sometimes clandestinely, to refer to another name, word, project, or person. Code names are often used for military purposes, or in espionage. They may also be used in industrial c ...
Velocity. In June 2010,
Microsoft Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washing ...
officially released AppFabric Caching as part of AppFabric. For more detailed information, see the history section of the AppFabric page.


Related caching technologies

AppFabric Caching is related to other Microsoft caching technologies. These technologies share similar features, such as the assembly name, namespace, and types. However, there are some differences. The table below describes these technologies.


References


External links


AppFabric 1.1 Caching Features

AppFabric Class Library Reference

Download: Microsoft AppFabric 1.1 for Windows Server

Download: Cumulative update package 3 for Microsoft AppFabric 1.1 for Windows Server
{{Microsoft Azure Services Platform Cache (computing) Microsoft software Windows Server