周翔 发表于 2017-6-30 22:39:26

[Azure][PowerShell][ARM][PAAS]Redis

  Switch-AzureMode -name AzureResourceManager
  Add-AzureAccount -Environment AzureChinaCloud
  Select-AzureSubscription -name “环境名称"
  New-AzureResourceGroup -Name $Name -Location "China North"
  New-AzureRedisCache -ResourceGroupName $ResourceGroup -Name $Name -Location "China North” -Sku Standard -Size $Size -EnableNonSslPort $true
  Get-azurerediscache
  Get-AzureRedisCacheKey -ResourceGroupName $ResourceName -Name $Name
  Set-AzureRedisCache -EnableNonSslPort $true -ResourceGroupName $ResourceGroupName -Name $Name -MaxMemoryPolicy VolatileLRU
  #内存清理策略:如果达到了maxmemory,你可以采取如下动作:
  #
  # volatile-lru -> 使用LRU算法来删除过期的set
  # allkeys-lru -> 删除任何遵循LRU算法的key
  # volatile-random ->随机地删除过期set中的key
  # allkeys->random -> 随机地删除一个key
  # volatile-ttl -> 删除最近即将过期的key(the nearest expire time (minor TTL))
  # noeviction -> 根本不过期,写操作直接报错
页: [1]
查看完整版本: [Azure][PowerShell][ARM][PAAS]Redis