Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateCacheKey ¶
GenerateCacheKey generates a cache key for the given method, encryptionToken and parameters encryptionToken is used to generate a unique cache key for each user and empty string should be used for public data
func IsCacheable ¶
IsCacheable checks if the given RPC request is cacheable and returns the cache key and TTL
Types ¶
type Cache ¶
type RPCMethodCacheConfig ¶ added in v0.22.1
Define a struct to hold the cache TTL and auth requirement
type RistrettoCache ¶
type RistrettoCache struct {
// contains filtered or unexported fields
}
func NewRistrettoCache ¶
func NewRistrettoCache(logger log.Logger) (*RistrettoCache, error)
NewRistrettoCache returns a new RistrettoCache.
Click to show internal directories.
Click to hide internal directories.