New-​Azure​Managed​Cache​Named​Cache

Creates a named cache in the specified Managed Cache Service instance.

Syntax

New-AzureManagedCacheNamedCache
   [-ExpiryPolicy <String>]
   [-ExpiryTime <Int32>]
   -Name <String>
   -NamedCache <String>
   [-Profile <AzureSMProfile>]
   [-WithHighAvailability]
   [-WithNotifications]
   [-WithoutEviction]
   [<CommonParameters>]

Description

The New-AzureManagedCacheNamedCache cmdlet creates a named cache in the specified Azure Managed Cache Service instance in your account and returns an object that represents the new Azure cache. Named caches are supported in the Standard and Premium cache offerings, and are not supported in the Basic cache offering.

Examples

Example 1: Create a named cache in the Managed Cache Service instance

PS C:\>New-AzureManagedCacheNamedCache -Name "ContosoCache" -NamedCache "ContosoNamedCache"

This command creates a named cache named ContosoNamedCache in the Managed Cache Service instance named ContosoCache. It uses default values for all the other parameters.

Example 2: Create a named cache in the specified Managed Cache Service instance with all parameters specified

PS C:\>New-AzureManagedCacheNamedCache -Name "ContosoCache" -NamedCache "ContosoNamedCache" -ExpiryPolicy "Sliding" -ExpiryTime 10 -WithNotifications -WithHighAvailability -WithoutEviction

This command creates a named cache named ContosoNamedCache in the Managed Cache Service instance named ContosoCache. It has Notifications and High Availability enabled and Eviction disabled.

Required Parameters

-Name

Specifies the name of the Managed Cache Service instance in which this cmdlet creates a named cache.

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

Specifies the name of the named cache that this cmdlet creates.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Optional Parameters

-ExpiryPolicy

Specifies the expiry policy for the named cache. The default value is Absolute.The acceptable values for this parameter are:- Absolute

  • Sliding
  • Never
Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ExpiryTime

Specifies the expiry time of the named cache, in minutes. The default value is 10.

Type:Int32
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
-WithHighAvailability

Indicates that high availability is enabled for the named cache.

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

Indicates that notifications are enabled for the named cache. Notifcations are supported in the Standard and Premium cache offerings, and are unavailable in the Basic cache offering.

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

Indicates that eviction is disabled for the named cache.

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

Inputs

None

Outputs

Microsoft.Azure.Commands.ManagedCache.Models.PSCacheServiceWithNamedCaches

Notes