MCPcopy
hub / github.com/go-gorm/gorm / PushFrontExpirable

Method PushFrontExpirable

internal/lru/lru.go:480–483  ·  view source on GitHub ↗

PushFrontExpirable inserts a new expirable element e with Value v at the front of list l and returns e.

(k K, v V, expiresAt time.Time)

Source from the content-addressed store, hash-verified

478
479// PushFrontExpirable inserts a new expirable element e with Value v at the front of list l and returns e.
480func (l *LruList[K, V]) PushFrontExpirable(k K, v V, expiresAt time.Time) *Entry[K, V] {
481 l.lazyInit()
482 return l.insertValue(k, v, expiresAt, &l.root)
483}
484
485// MoveToFront moves element e to the front of list l.
486// If e is not an element of l, the list is not modified.

Callers 1

AddMethod · 0.80

Calls 2

lazyInitMethod · 0.95
insertValueMethod · 0.95

Tested by

no test coverage detected