Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCacheNotFound = errors.New("juice: cache not found")
ErrCacheNotFound is the error that cache not found.
Functions ¶
This section is empty.
Types ¶
type ScopeCache ¶
type ScopeCache interface { // Set sets the value for the key. Set(ctx context.Context, key string, value any) error // Get gets the value for the key. // If the value does not exist, it should return ErrCacheNotFound. Get(ctx context.Context, key string, prt any) error // Flush flushes all the cache. // It will be called after Commit() or Rollback(). Flush(ctx context.Context) error }
ScopeCache is an interface for transactional cache.
func InMemoryScopeCache ¶
func InMemoryScopeCache() ScopeCache
InMemoryScopeCache returns a new instance of inMemoryScopeCache.
Click to show internal directories.
Click to hide internal directories.