Skip to content

Commit

Permalink
Strip away any units, not just MiB
Browse files Browse the repository at this point in the history
  • Loading branch information
rzvoncek committed Oct 29, 2024
1 parent 7ebd6b5 commit d82a791
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ data class CassandraYaml(val data : JsonNode) : YamlConfig(data) {
val memtableAllocationType get() = get("memtable_allocation_type")
val authorizer get() = get("authorizer")
val rowCacheSizeInMB get() = (
get("row_cache_size", "0").replace("MiB", "")
get("row_cache_size", "0").replace("\\D+".toRegex(), "")
).toInt()
fun isRowCacheEnabled(): Boolean {
return (rowCacheSizeInMB.toString().toInt() > 0)
Expand Down

0 comments on commit d82a791

Please sign in to comment.