mirror of
https://github.com/SagerNet/sing.git
synced 2025-04-03 20:07:38 +03:00
Add freelru.GetWithLifetimeNoExpire
This commit is contained in:
parent
ea0ac932ae
commit
ea82ac275f
4 changed files with 41 additions and 0 deletions
|
@ -49,6 +49,8 @@ type Cache[K comparable, V comparable] interface {
|
|||
|
||||
GetWithLifetime(key K) (V, time.Time, bool)
|
||||
|
||||
GetWithLifetimeNoExpire(key K) (V, time.Time, bool)
|
||||
|
||||
// GetAndRefresh returns the value associated with the key, setting it as the most
|
||||
// recently used item.
|
||||
// The lifetime of the found cache item is refreshed, even if it was already expired.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue