Documentation ¶
Index ¶
- type Cache
- type ConnectionCache
- func (c *ConnectionCache) Clear(ctx context.Context)
- func (c *ConnectionCache) Delete(ctx context.Context, key string)
- func (c *ConnectionCache) Get(ctx context.Context, key string) (interface{}, bool)
- func (c *ConnectionCache) Set(ctx context.Context, key string, value interface{}) error
- func (c *ConnectionCache) SetWithTTL(ctx context.Context, key string, value interface{}, ttl time.Duration) error
- type Manager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
deprecated use ConnectionCache
func NewCache ¶
func NewCache(connectionCache *ConnectionCache) *Cache
type ConnectionCache ¶
type ConnectionCache struct {
// contains filtered or unexported fields
}
ConnectionCache is a simple cache wrapper - multiple connections use the same underlying cache (owned by the plugin) ConnectionCache modifies the cache keys to include the connection name and uses the underlying shared cache
func NewConnectionCache ¶
func NewConnectionCache(connectionName string, connectionCache *cache.Cache[any]) *ConnectionCache
func (*ConnectionCache) Clear ¶ added in v4.1.0
func (c *ConnectionCache) Clear(ctx context.Context)
Clear deletes all cache items for this connection
func (*ConnectionCache) Get ¶
func (c *ConnectionCache) Get(ctx context.Context, key string) (interface{}, bool)
func (*ConnectionCache) Set ¶
func (c *ConnectionCache) Set(ctx context.Context, key string, value interface{}) error
func (*ConnectionCache) SetWithTTL ¶
type Manager ¶
type Manager struct {
Cache *Cache
}
deprecated use ConnectionCache
func NewManager ¶
func NewManager(connectionCache *ConnectionCache) *Manager
Click to show internal directories.
Click to hide internal directories.