Skip to content

Commit

Permalink
Prevent usage of LRU queue if not needed (#26)
Browse files Browse the repository at this point in the history
* Fix options

* Add unit tests

* Fix naming
  • Loading branch information
erni27 committed Apr 15, 2023
1 parent 14d3d49 commit 8a39547
Show file tree
Hide file tree
Showing 3 changed files with 202 additions and 185 deletions.
2 changes: 0 additions & 2 deletions cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ func (c *Cache[K, V]) Len() int {

// StartCleaner starts a cleaner that periodically removes expired entries.
// A cleaner runs in a separate goroutine.
// It's a NOP method if the cleaner is already running.
// It returns an error if the cleaner is already running
// or if the interval is less than or equal to zero.
//
Expand Down Expand Up @@ -643,7 +642,6 @@ func (s *Sharded[K, V]) Len() int {

// StartCleaner starts a cleaner that periodically removes expired entries.
// A cleaner runs in a separate goroutine.
// It's a NOP method if the cleaner is already running.
// It returns an error if the cleaner is already running
// or if the interval is less than or equal to zero.
//
Expand Down

0 comments on commit 8a39547

Please sign in to comment.