Enabling 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:

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.


  1. 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' };

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com