Enable caching globally
Use CQL to enable or disable caching by configuring the caching table property.
Set parameters in the cassandra.yaml
file to configure global caching properties:
-
How often Hyper-Converged Database (HCD) saves row caches to disk
Configuring the row_cache_size_in_mb
(in the cassandra.yaml
configuration file) determines how much space in memory the database allocates to store rows from the most frequently read partitions of the table.
Set the table caching property
-
Set the table caching property that configures the partition key cache and the row cache.
CREATE TABLE users ( userid text PRIMARY KEY, first_name text, last_name text, ) WITH caching = { 'rows_per_partition' : '120' };