Suspend/Resume Data Persistence
A Distributed Cache with Persistence enables data persistence. NCache provides you with Command Line Tools that allow you to Suspend and then Resume persisting data to your persistence store provided that your store type is a Distributed Cache with Persistence. The main purpose of these cmdlets is to allow you to stop writing data to the backend store while you are performing some actions on the backend store, for example taking a backup or moving the store to a new location. However, there are some precautions you should consider.
Firstly, you should only use these cmdlets when the volume of traffic is low on your cache. As, when you suspend data persistence on the persistence store, the cache remains functional. During this time, operations can still be performed on the cache in memory. This means that all pending operations on the persistence store will be placed in the persistence queue. Now, if the volume of operations is high on the cache, the persistence queue will fill up quickly. This will cause memory issues, which in turn will hamper the overall performance of your cache.
Secondly, you need to ensure that while your data persistence to the persistence store has been suspended, no configuration change takes place (node add/remove/join/leave) that might trigger state transfer on the cache. This will cause some complications.
Lastly, you need to ensure that the persistence store is running on at least one node before you suspend and later on resume data persistence.
Suspend NCache Data Persistence
The Suspend NCache Data Persistence tool suspends or halts the action of data being sent or persisted on the persistence store. As stated above, you should use this cmdlet whenever you want to make a backup & restore of your persistence store.
Suspend-NCacheDataPersistence Usage
The following command suspends data persistence on the persistence store for the cache demoCache.
Resume NCache Data Persistence
The Resume NCache Data Persistence tool resumes or restarts the action of data being sent or persisted on the persistence store. You should use this cmdlet when you want to restart or resume persisting data on your persistence store.
Resume-NCacheDataPersistence Usage
The following command resumes data persistence on the persistence store for the cache demoCache.
See Also
Create Distributed Cache with Persistence
Distributed Cache with Persistence Settings