Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimpleCachePlugin ¶
type SimpleCachePlugin struct {
// contains filtered or unexported fields
}
SimpleCachePlugin implements the easyrest.CachePlugin interface using an in-memory cache with expiring keys based on github.com/patrickmn/go-cache. Note: This is not strictly LRU, but provides the required Set-with-TTL functionality.
func NewSimpleCachePlugin ¶
func NewSimpleCachePlugin() *SimpleCachePlugin
NewSimpleCachePlugin creates a new instance of SimpleCachePlugin.
func (*SimpleCachePlugin) Get ¶
func (p *SimpleCachePlugin) Get(key string) (string, error)
Get retrieves the value associated with the key.
func (*SimpleCachePlugin) InitConnection ¶
func (p *SimpleCachePlugin) InitConnection(uri string) error
InitConnection initializes the cache. The URI is currently ignored for the in-memory implementation.
Click to show internal directories.
Click to hide internal directories.