Documentation
¶
Index ¶
- Constants
- func Clear(prefix string) error
- func Delete(key string) error
- func EntityStmtCacheKey(subID, issID string) string
- func Get(key string, target any) (bool, error)
- func Key(subsystem ...string) string
- func Set(key string, value any, duration time.Duration) error
- func SetCache(cache Cache)
- func SetMaxLifetime(d time.Duration)
- func UseNoopCache()
- func UseRedisCache(options *redis.Options) error
- type Cache
Constants ¶
View Source
const ( KeyEntityStatement = "entity_statement" KeyOPMetadata = "op_metadata" KeyEntityConfiguration = "entity_configuration" KeyTrustTree = "trust_tree" KeyTrustTreeChains = "trust_tree_chains" KeyTrustChainResolvedMetadata = "trustchain_resolved_metadata" KeySubordinateListing = "subordinate_listing" KeyExplicitRegistration = "explicit_registration" )
Constants for keys for sub caches
Variables ¶
This section is empty.
Functions ¶
func EntityStmtCacheKey ¶
EntityStmtCacheKey constructs a cache key for an EntityStatementPayload
func SetMaxLifetime ¶ added in v0.9.0
SetMaxLifetime sets a maximum lifetime for all cache entries. If d <= 0, the limit is disabled.
func UseNoopCache ¶ added in v0.9.0
func UseNoopCache()
UseNoopCache configures the global cache to a no-op implementation, effectively disabling caching across the library.
func UseRedisCache ¶
UseRedisCache creates a new redis cache with the passed options and sets it to be used
Types ¶
Click to show internal directories.
Click to hide internal directories.