From 7d532553ae18bfff1bec9e0df3fa66313073e3dd Mon Sep 17 00:00:00 2001 From: Marc Pervaz Boocha Date: Thu, 15 May 2025 17:56:07 +0530 Subject: Add raw API --- store.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'store.go') diff --git a/store.go b/store.go index aa44dc4..ccda46d 100644 --- a/store.go +++ b/store.go @@ -228,7 +228,7 @@ func (s *store) Evict() bool { } // insert adds a new key-value pair to the store. -func (s *store) insert(key []byte, value []byte, ttl time.Duration) { +func (s *store) insert(key, value []byte, ttl time.Duration) { idx, hash := lookupIdx(s, key) bucket := &s.Bucket[idx] @@ -264,7 +264,7 @@ func (s *store) insert(key []byte, value []byte, ttl time.Duration) { } // Set adds or updates a key-value pair in the store with locking. -func (s *store) Set(key []byte, value []byte, ttl time.Duration) { +func (s *store) Set(key, value []byte, ttl time.Duration) { s.Lock.Lock() defer s.Lock.Unlock() -- cgit v1.2.3-70-g09d2