Sorry Joey, I couldn't find spicedb_cache_hits_tot...
# spicedb
t
Sorry Joey, I couldn't find spicedb_cache_hits_total, this is the only caching we found in the code
Copy code
// RegisterCacheFlags registers flags used to configure SpiceDB's various
// caches.
func RegisterCacheFlags(flags *pflag.FlagSet, flagPrefix string, config, defaults *CacheConfig) {
    config.Name = defaults.Name
    flagPrefix = stringz.DefaultEmpty(flagPrefix, "cache")
    flags.StringVar(&config.MaxCost, flagPrefix+"-max-cost", defaults.MaxCost, "upper bound cache size in bytes or percent of available memory")
    flags.Int64Var(&config.NumCounters, flagPrefix+"-num-counters", defaults.NumCounters, "number of TinyLFU samples to track")
    flags.BoolVar(&config.Metrics, flagPrefix+"-metrics", defaults.Metrics, "enable cache metrics")
    flags.BoolVar(&config.Enabled, flagPrefix+"-enabled", defaults.Enabled, "enable caching")
}
In the logs, we see 3 different caching {"level":"info","maxCost":"1.7 GiB","numCounters":200000,"defaultTTL":20600,"time":"2023-09-26T15:53:25Z","message":"configured cluster dispatch cache"} {"level":"info","maxCost":"32 MiB","numCounters":1000,"defaultTTL":0,"time":"2023-09-26T15:53:25Z","message":"configured namespace cache"} {"level":"info","maxCost":"734 MiB","numCounters":10000,"defaultTTL":20600,"time":"2023-09-26T15:53:25Z","message":"configured dispatch cache"} Which parameter should we configure to increase this "maxCost" value, such that SpiceDB can use more memory?