Set-​Azure​Managed​Cache

Changes the properties of an Azure Cache.

Syntax

Set-AzureManagedCache
   [-Force]
   [-Memory <String>]
   -Name <String>
   [-Profile <AzureSMProfile>]
   [-Sku <CacheServiceSkuType>]
   [<CommonParameters>]

Description

The Set-AzureManagedCache cmdlet changes the properties of an Azure Cache and returns an object that represents the cache with the changes. Use the Name and Location parameters to identify the Azure Cache, and the Sku and Memory parameters to change its properties. An Azure Cache is a secure, dedicated cache that provides extremely fast access to data. This distributed, in-memory, scalable solution enables you to build highly scalable and responsive applications. For more information about Azure Cache, see Azure Cache (http://azure.microsoft.com/en-us/services/cache/).

WARNING When you change the SKU of an Azure Cache, all data in the cache is deleted and a new, empty Azure Cache is created for you with the same name and location.

Examples

Example 1: Change the size of an Azure Cache

PS C:\>Set-AzureManagedCache -Name "ContosoCache" -Location "West Europe" -Memory 256MB

This command increases the size of the Azure Cache named ContosoCache to 256 MB.

Example 2: Change the SKU of an Azure Cache

PS C:\>Set-AzureManagedCache -Name "ContosoCache" -Location "West Europe" -Sku Standard -Size 10GB

Confirm
Are you sure you want to perform this action? 
Performing the operation "Delete" on target "ContosoCache".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"):

This command changes the SKU of the Azure Cache named ContosoCache from Basic to Standard and the Size to 10 GB.

Required Parameters

-Name

Specifies the name of the Azure Cache. The parameter value is case-sensitive. You cannot use this cmdlet to change the name of an Azure Cache.

Type:String
Position:Named
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Memory

Specifies the new size of the Azure Cache. The cache size might affect the cost of the service. Enter a value followed by MB or GB, such as 128MB or 8GB. This value must be compatible with the Sku of the Azure Cache. This parameter has the following considerations: - When the value of Sku is Basic, the value of Memory must be divisible by 128 MB.

  • When the value of Sku is Standard, the value of Memory must be divisible by 1 GB.
  • When the value of Sku is Premium, the value of Memory must be divisible by 5 GB.
Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Profile

Specifies the Azure profile from which this cmdlet reads. If you do not specify a profile, this cmdlet reads from the local default profile.

Type:AzureSMProfile
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Sku

Specifies the tier of the Azure Cache.The acceptable values for this parameter are:- Basic (128 MB - 1 GB)

  • Standard (1 GB - 10 GB)
  • Premium (5 GB - 150 GB)
Type:CacheServiceSkuType
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

Microsoft.Azure.Commands.ManagedCache.Models.PsCacheService

Notes