Eksportuj (0) Drukuj
Rozwiń wszystko
EN
Ta zawartość nie jest dostępna w wymaganym języku. Wersja w języku angielskim znajduje się tutaj.
Ten temat nie został jeszcze oceniony - Oceń ten temat

How to: Create a Cache for Windows Azure Cache Service (Preview)

The topic provides a walkthrough of creating and configuring a cache for Windows Azure Cache Service (Preview).

Creating a Cache

There are three basic steps to perform when creating a cache. The first step is to choose the cache offering that meets your application's cache requirements. The second step is to create the cache using the Management Portal. Once the cache is created, it is ready to use with default settings. The third step is to configure the cache to use any features such as notifications or high availability it so that is can better meet your application's requirements.

Sign up for the Cache Service Preview Program

If this is your first time working with Cache Service (Preview) then you need to request access to the Cache Service preview program from the Windows Azure Management Portal. To sign up for the preview program, click New, Data Services, Cache Preview, Preview Program.

Cache Preview Program Sign Up

Follow the prompts to request access to the Cache Service preview program. After completing the sign up steps, your request is in a pending status.

Cache Preview Program Sign Up Pending

As soon as you're granted access, you'll be notified, and you can proceed to the next steps.

Choose a Cache Offering

Cache Service (Preview) is available in the following three offerings.

  • Basic - Cache in sizes from 128MB to 1GB in 128MB increments, with one default named cache

  • Standard - Cache in sizes from 1GB to 10GB in 1GB increments, with support for notifications and up to ten named caches

  • Premium - Cache in sizes from 5GB to 150GB in 5GB increments, with support for notifications, high availability, and up to ten named caches

noteNote
Each offering differs in terms of pricing and features. For more information see Cache Service Pricing FAQ.

If your application requires notifications, then choose the Standard or Premium cache offerings, and if your application requires high availability, choose the Premium offering.

Cache Service (Preview) also provides a capacity planning guide, which can help model your cache requirements and provide a starting point for your cache offering and size. For more information, see Capacity Planning for Windows Azure Cache Service (Preview)

For additional guidance on choosing a cache offering, see Capacity Planning for Windows Azure Cache Service (Preview).

Create the Cache

To create a cache, sign in to the Management Portal and click New, Data Services, Cache Preview, Create.

Create Cache Menu for Windows Azure Cache Service

Clicking Create displays the New Cache dialog.

Create Cache Dialog for Windows Azure Cache

In Endpoint, enter a unique name to use in the cache endpoint. The endpoint must be a string between six and twenty characters, contain only lowercase numbers and letters, and must start with a letter.

In Region, select a region for the cache. For the best performance, create the cache in the same region as the cache client application.

In Subscription, select the Windows Azure subscription that you want to use for the cache.

Cache Offering and Cache Memory work together to determine the size of the cache. Cache Service (Preview) is available in Basic, Standard, and Premium tiers. Each tier differs in size, pricing, and cache features. The previous Choose a Cache Offering section provides an overview and basic guidance on selecting a cache offering to use. Choose the Cache Offering and Cache Memory that meets the needs of your application.

Once the new cache options are configured, it can take a few minutes for the cache to be created. To check the status, you can monitor the notifications at the bottom of the portal. After the cache has been created, your new cache has a Running status and is ready for use with default settings. To customize the configuration of your cache, see the following Configure the Cache section.

Once you have decided on a cache offering, you are ready to create the cache.

noteNote
You can always scale a cache up or down, in both size and cache offering, if the needs of your application change. For more information, see Scale a Cache for Windows Azure Cache Service (Preview).

Configure the Cache

Cache Service (Preview) supports named caches, which provide you the flexibility to configure different cache options for different sets of data. Every cache has a default named cache, and in the Standard and Premium cache offerings, up to nine additional named caches can be configured. Each named cache has its own individual settings, such as high availability, notifications, and custom eviction and expiration policies. Named cache settings are configured in the Management Portal on the Configure tab for Cache.

Named Caches in Windows Azure Cache Service

The following table provides an overview of Cache Service (Preview) features.

 

Feature Description

Name

A default cache is configured, and in the Standard and Premium cache offerings, up to nine additional named caches can be configured if desired.

Expiry Policy

There are three types of Expiry Policy: Never, Absolute, and Sliding. When Absolute is specified, the expiration interval specified by Time (min) begins when items are added to the cache. When Sliding is specified, the interval is reset each time an item is accessed in the cache. When None is specified, Time (min) must be set to 0, and items will not expire. The default is Absolute.

For more information, see Expiration and Eviction for Windows Azure Cache Service (Preview).

Time (min)

The default expiration for items in the cache is 10 minutes, but it is configurable. The expiration time for individual items added to the cache can also be specified using overloads of Add and Put when items are added to the cache. Tim (min) works in conjunction with Expiry Policy to determine when items expire.

Notifications

Notifications allow your application to receive asynchronous notifications when various cache operations occur in the cache.

Notifications are available in the Standard and Premium cache offerings, and are not available in the Basic cache offering. For more information, see Cache Offerings for Windows Azure Cache Service (Preview) and Notifications for Windows Azure Cache Service (Preview).

High Availability

Provides high availability for items in the cache. If items are lost due to a failure, backup copies of the items in the cache are still available.

High availability is only available in the Premium cache offering, and is not available in the Basic or Standard cache offerings. For more information, see Cache Offerings for Windows Azure Cache Service (Preview) and High Availability for Windows Azure Cache Service (Preview).

Eviction

Choices are Enabled, which uses a LRU (last recently used) algorithm to determine which items to evict, or Disabled. The default is Enabled.

Once your cache is created and configured, you can connect to it from your client applications. For more information, see Configure cache clients for Windows Azure Cache Service (Preview).

Czy oceniasz te materiały jako pomocne?
(Pozostało znaków: 1500)
Dziękujemy za opinię.

Zawartość społeczności

Dodaj
Pokaż:
© 2014 Microsoft. Wszelkie prawa zastrzeżone.