What is the difference between key cache and row cache, and why can the row cache be dangerous?

Last updated 11 July 2026

  • Key cache maps a partition key to its SSTable offset, saving an index seek. It is small, on by default and safe.

  • Row cache stores actual rows in memory to skip disk entirely. It is off by default and only helps small, very hot, read-mostly partitions.

  • Row cache is dangerous because it caches whole partitions (wide ones eat huge memory) and any write invalidates the entry, causing churn, GC pressure and thrashing.

  • https://cassandra.apache.org/doc/4.1/cassandra/configuration/cass_yaml_file.html
  • https://docs.datastax.com/en/cassandra-oss/2.2/cassandra/dml/dmlAboutReads.html
  • https://www.vskills.in/certification/tutorial/caching-and-buffer-sizing/
  • https://saugereau.github.io/blog/2014/12/cassandra-cache/
  • https://cassandra.apache.org/doc/stable/cassandra/developing/cql/ddl.html
  • https://docs.datastax.com/en/cassandra-oss/2.1/cassandra/dml/dml_row_cache_reads.html
  • https://medium.com/analytics-vidhya/anti-patterns-which-all-cassandra-users-must-know-1e54c60ff1fa
  • https://docs.datastax.com/en/cassandra-oss/3.0/cassandra/operations/opsConfiguringCaches.html
All Cassandra interview questions