Source File
csc_stats.go
Belonging Package
github.com/redis/go-redis/v9
package redis// CSCStats reports cumulative client-side cache activity and current// residency.//// Experimental: this API may change in a minor release.type CSCStats struct {Hits uint64Misses uint64Entries intMemoryUsageBytes int64}// cacheStatsReporter is an optional interface a Cache implementation may// satisfy to expose statistics. The built-in LocalCache does; user// implementations are not required to.type cacheStatsReporter interface {Stats() CSCStats}// CSCStats returns statistics for this client's client-side cache, read from// the shared cache when its implementation exposes them (the built-in// LocalCache does).//// It returns a zero value when CSC is not configured or stats are unavailable.//// Experimental: this API may change in a minor release.func ( *Client) () CSCStats {if == nil || .baseClient.csc == nil {return CSCStats{}}if , := .baseClient.csc.(cacheStatsReporter); {return .Stats()}return CSCStats{}}
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |