How to: Edit Cache Configuration Settings with PowerShell (Velocity)
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
Microsoft project code named "Velocity" allows you to create and configure your named cache with a PowerShell-based cache administration tool. This topic describes how to use PowerShell to directly create and configure named caches.
Cache configuration settings are stored in the cluster configuration storage location. For more information about the available cache settings, see the Cache Settings heading in Cluster Configuration Settings (Velocity).
There are two PowerShell commands that you can use to edit cache configuration settings: New-Cache
(used with Remove-Cache
) and Set-CacheConfig
(with the -CacheName
parameter). Both of these approaches re-create the named cache; earlier settings do not persist and all desired settings must be re-specified each time. For more information about PowerShell commands, see Cache Administration with PowerShell (Velocity).
The New-Cache
approach requires that the named cache be removed, flushing all data out of the cache. The Set-CacheConfig
requires downtime from the entire cache cluster to implement changes. To optimize availability of your cache cluster, we recommend that you use the New-Cache
(used with Remove-Cache
) approach.
In addition to the procedures described in this topic, you can also directly edit cache configuration attributes in XML. For more information, see How to: Edit Cluster Configuration Settings (Velocity).
These procedures assume that you have a running cache cluster.
Using the New-Cache and Remove-Cache commands to edit cache configuration settings
Use the
Get-CacheConfig
orExport-CacheClusterConfig
commands to view the current cluster configuration settings.Determine which settings you would like to change for the named cache. To minimize downtime of the named cache, we suggest preparing the corresponding
New-Cache
command before proceeding.Remove the named cache from the cluster with the
Remove-Cache
command. Note: This will flush all data out of the named cache but will not impact other named caches in the cluster.Use the
New-Cache
command to create a new named cache with the desired configuration settings.
Using the Set-CacheConfig command to edit cache configuration settings
Use the
Get-CacheConfig
orExport-CacheClusterConfig
commands to view the current cluster configuration settings.Determine which settings you would like to change for the named cache. To minimize downtime of the cache cluster, we suggest preparing the corresponding
Set-CacheCluster
command(s) before proceeding.Stop the cache cluster if it is running with the
Stop-CacheCluster
. Note: This will flush all data out of the cache cluster.Use the
Set-CacheCluster
command with theCacheName
parameter to make the desired cache host or named cache configuration changes.Start the cache cluster with the
Start-CacheCluster
command for the new configuration settings to take affect.
See Also
Tasks
How to: Set the Cluster Management Role and Lead Host Designations (Velocity)
How to: Edit Cluster Configuration Settings (Velocity)
Concepts
Cache Administration with PowerShell (Velocity)
Configuration (Velocity)
Other Resources
Cache Concepts (Velocity)
Configuring the Cache Cluster (Velocity)
Configuring the Cache Client with XML (Velocity)
Using Configuration Methods (Velocity)