Reputation: 13
This would be lovely, since some cf have a limited number of keys, or queries are intensive on these keys, etc.
Thx
Edit : to be more precise, I'm interested in the partition key disk-location caching for a given table.
Edit 2 : This thread seems to give the answer http://cassandra-user-incubator-apache-org.3065146.n2.nabble.com/What-is-substituting-keys-cached-column-family-argument-td7584136.html Cassandra now prevents any manual tuning for keys or row caching (that used to be allowed with the keys_cached or rows_cahed arguments on a per-CF basis), and instead uses its own global caching manager. This is annoying in the specific case of CFs that are not often queried, but from which we expect low latency. Obviously this is my case. Anyone from Apache/Datastax could tell me if there is any chance this might evolve? Thx.
Upvotes: 0
Views: 722
Reputation: 8394
If you have a range of keys that are being queried frequently across a Cassandra cluster, Cassandra's built-in keycache will retain those values in memory for you automatically on a per-column family basis.
The keycache is turned on by default, so no configuration changes are necessary.
Now if your question pertains to being able to have Cassandra automatically warm the keycache for the entire key range for any column families you specify, I don't believe this is possible, at least according to the Cassandra 2.0 documentation.
Your best option, if you really, really need to warm the cache yourself instead of letting it happen at runtime, would be to create your own startup application that queries your desired key ranges at startup.
Upvotes: 2