Cassandra 行缓存逐出策略
Cassandra row cache eviction policy
我一直在阅读有关 Cassandra 的行缓存的信息,并遇到了这个 post:Difference between Cassandra Row caching and Partition key caching
在较新的行缓存实现中,不需要保存整个分区。相反,您可以在创建 table 时指定每个分区要保存的行数。但是,当写入请求到来时,驱逐策略是什么?即使在给定分区中只修改了一行,它仍然会使整个分区无效吗?
大多数情况下不推荐使用行缓存。
是的,它仍然会使整个分区无效。
Tip: Enable a row cache only when the number of reads is much bigger
(rule of thumb is 95%) than the number of writes. Consider using the
operating system page cache instead of the row cache, because writes
to a partition invalidate the whole partition in the cache.
来源:
https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsConfiguringCaches.html
我一直在阅读有关 Cassandra 的行缓存的信息,并遇到了这个 post:Difference between Cassandra Row caching and Partition key caching
在较新的行缓存实现中,不需要保存整个分区。相反,您可以在创建 table 时指定每个分区要保存的行数。但是,当写入请求到来时,驱逐策略是什么?即使在给定分区中只修改了一行,它仍然会使整个分区无效吗?
大多数情况下不推荐使用行缓存。 是的,它仍然会使整个分区无效。
Tip: Enable a row cache only when the number of reads is much bigger (rule of thumb is 95%) than the number of writes. Consider using the operating system page cache instead of the row cache, because writes to a partition invalidate the whole partition in the cache.
来源: https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsConfiguringCaches.html