From 7fe79f49b03fa7f6124a639d4b229e432ac3c840 Mon Sep 17 00:00:00 2001 From: Marc Pervaz Boocha Date: Thu, 27 Feb 2025 18:22:35 +0530 Subject: Resizing imporvements and typo fixes --- conn.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'conn.go') diff --git a/conn.go b/conn.go index 2495443..f34db81 100644 --- a/conn.go +++ b/conn.go @@ -311,15 +311,15 @@ func (h *DB[K, V]) UpdateInPlace(key K, processFunc func(V) (V, error), ttl time }, ttl) } -// Memoize attempts to retrieve a value from the cache. If the retrieval fails, +// Memorize attempts to retrieve a value from the cache. If the retrieval fails, // it sets the result of the factory function into the cache and returns that result. -func (h *DB[K, V]) Memoize(key K, factoryFunc func() (V, error), ttl time.Duration) (V, error) { +func (h *DB[K, V]) Memorize(key K, factoryFunc func() (V, error), ttl time.Duration) (V, error) { keyData, err := marshal(key) if err != nil { return zero[V](), err } - data, err := h.Store.Memoize(keyData, func() ([]byte, error) { + data, err := h.Store.Memorize(keyData, func() ([]byte, error) { value, err := factoryFunc() if err != nil { return nil, err -- cgit v1.2.3-70-g09d2