nodetool setcachekeystosave

Sets the number of keys saved by each cache for faster post-restart warmup.

Sets the number of keys saved by each cache for faster post-restart warmup.

Synopsis 

C:\> %CASSANDRA_HOME%\bin\nodetool <options> setcachekeystosave -- <key-cache-keys-to-save> <row-cache-keys-to-save>
Options
Short Long Description
-h --host Hostname or IP address.
-p --port Port number.
-pwf --password-file Password file path.
-pw --password Password.
-u --username Remote JMX agent username.
key-cache-keys-to-save The number of keys from the key cache to save to the saved caches directory. To disable, set to 0.
row-cache-keys-to-save The number of keys from the row cache to save to the saved caches directory. To disable, set to 0.
counter-cache-keys-to-save The number of keys from the counter cache to saved to the saved caches directory. To disable, set to 0.
-- Separates an option from an argument that could be mistaken for a option.

Description 

This command saves the specified number of key and row caches to the saved caches directory, which you specify in the cassandra.yaml. The key-cache-keys-to-save argument corresponds to the key_cache_keys_to_save in the cassandra.yaml, which is disabled by default, meaning all keys will be saved. The row-cache-keys-to-save argument corresponds to the row_cache_keys_to_save in the cassandra.yaml, which is disabled by default.

The location of the cassandra.yaml file depends on the type of installation:
Windows 3.x installations C:\Program Files\DataStax-DDC\apache-cassandra\conf\cassandra.yaml
CASSANDRA_HOME
Windows 3.0 installations C:\Program Files\Datastax Community\apache-cassandra\
Windows 3.x installations C:\Program Files\Datastax-DDC\apache-cassandra\
On a standard Windows installation, the installation wizard creates %CASSANDRA_HOME% as an environment variable.