Documentation
¶
Overview ¶
Package cache defines utilities for caching data or state.
Index ¶
Constants ¶
View Source
const ( // Apply caching wherever possible Apply = iota // NoCache directive does not prevent the storing of data but instead prevents the reuse of data without revalidation NoCache // NoStore directive ensures there is no caching performed at all NoStore )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IServerCache ¶
type IServerCache interface { // SetCacheControl specifies the caching behaviour. SetCacheControl(control Control) error // GetCacheControl returns the caching behaviour followed. GetCacheControl() Control // SetKey sets an explicit key for restoring and saving the cache SetKey(key string) error // GetKey returns an explicit key for restoring a cache GetKey() string // Invalidate invalidates all cache entries. Invalidate(ctx context.Context) error }
IServerCache defines a caching mechanism server-side.
type ServiceCache ¶
type ServiceCache struct {
// contains filtered or unexported fields
}
func (*ServiceCache) GetCacheControl ¶
func (c *ServiceCache) GetCacheControl() Control
func (*ServiceCache) GetKey ¶
func (c *ServiceCache) GetKey() string
func (*ServiceCache) Invalidate ¶
func (c *ServiceCache) Invalidate(context.Context) error
func (*ServiceCache) SetCacheControl ¶
func (c *ServiceCache) SetCacheControl(control Control) error
func (*ServiceCache) SetKey ¶
func (c *ServiceCache) SetKey(key string) (err error)
Click to show internal directories.
Click to hide internal directories.