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

Method insertValue

internal/lru/lru.go:443–445  ·  view source on GitHub ↗

insertValue is a convenience wrapper for insert(&Entry{Value: v, ExpiresAt: ExpiresAt}, at).

(k K, v V, expiresAt time.Time, at *Entry[K, V])

Source from the content-addressed store, hash-verified

441
442// insertValue is a convenience wrapper for insert(&Entry{Value: v, ExpiresAt: ExpiresAt}, at).
443func (l *LruList[K, V]) insertValue(k K, v V, expiresAt time.Time, at *Entry[K, V]) *Entry[K, V] {
444 return l.insert(&Entry[K, V]{Value: v, Key: k, ExpiresAt: expiresAt}, at)
445}
446
447// Remove removes e from its list, decrements l.len
448func (l *LruList[K, V]) Remove(e *Entry[K, V]) V {

Callers 2

PushFrontMethod · 0.95
PushFrontExpirableMethod · 0.95

Calls 1

insertMethod · 0.95

Tested by

no test coverage detected