Skip to content

Commit

Permalink
nit: added comment explaining function behavior
Browse files Browse the repository at this point in the history
Signed-off-by: Ashish Naware <ashishnaware3@gmail.com>
  • Loading branch information
AshishNaware committed Sep 17, 2024
1 parent 09fb765 commit dc13ea6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/observer/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ type cache struct {
size int
}

func newCache(
dataCacheSize int,
) (*cache, error) {
// newCache constructs a cache of fixed size with the callback function that increments
// data_cache_evictions_total counter every time the cache is evicted.
func newCache(dataCacheSize int) (*cache, error) {
lruCache, err := lru.NewWithEvict(
dataCacheSize,
func(_ dataapi.DataEventId, _ []byte) {
Expand Down

0 comments on commit dc13ea6

Please sign in to comment.