Documentation ¶
Index ¶
- type Entry
- type Store
- func (s *Store) Delete(key string) error
- func (s *Store) DeleteKeys(keys []string) error
- func (s *Store) Exists(key string) (bool, error)
- func (s *Store) Get(key string) (*Entry, error)
- func (s *Store) GetOrDefer(key string, deferFn func() (*Entry, error)) (*Entry, error)
- func (s *Store) Set(key string, e Entry) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Entry ¶
Entry stores a cache line given a value and expiry time
func ExpiresRolling ¶
ExpiresRolling creates a cache entry that expires at the given time, though expiry will roll forward when accessed
func Forever ¶
func Forever(value interface{}) Entry
Forever creates a cache entry that shall never expire
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store Party cache entries
func (*Store) DeleteKeys ¶
DeleteKeys deletes all given keys
func (*Store) GetOrDefer ¶
GetOrDefer a cache entry, deferring to supplier func if entry doesn't exist or is expired. If key exists and is expired, entry is deleted
Click to show internal directories.
Click to hide internal directories.