Skip to content

Commit

Permalink
add interface comments
Browse files Browse the repository at this point in the history
  • Loading branch information
umputun committed Jan 25, 2019
1 parent 222fa65 commit 4f44926
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ type Sizer interface {

// LoadingCache defines guava-like cache with Get method returning cached value ao retriving it if not in cache
type LoadingCache interface {
Get(key string, fn func() (Value, error)) (val Value, err error)
Peek(key string) (Value, bool)
Invalidate(fn func(key string) bool)
Purge()
Stat() CacheStat
Get(key string, fn func() (Value, error)) (val Value, err error) // load or get from cache
Peek(key string) (Value, bool) // get from cache by key
Invalidate(fn func(key string) bool) // invalidate items for func(key) == true
Purge() // clear cache
Stat() CacheStat // cache stats
}

// CacheStat represent stats values
Expand Down

0 comments on commit 4f44926

Please sign in to comment.