diff options
author | Marc Pervaz Boocha <marcpervaz@qburst.com> | 2025-05-15 17:56:07 +0530 |
---|---|---|
committer | Marc Pervaz Boocha <marcpervaz@qburst.com> | 2025-05-15 17:56:07 +0530 |
commit | 7d532553ae18bfff1bec9e0df3fa66313073e3dd (patch) | |
tree | 796a7fe86da764f51648b1337011baeaaf53421b /store.go | |
parent | Lint and bug fixes (diff) | |
download | cache-7d532553ae18bfff1bec9e0df3fa66313073e3dd.tar cache-7d532553ae18bfff1bec9e0df3fa66313073e3dd.tar.gz cache-7d532553ae18bfff1bec9e0df3fa66313073e3dd.tar.bz2 cache-7d532553ae18bfff1bec9e0df3fa66313073e3dd.tar.lz cache-7d532553ae18bfff1bec9e0df3fa66313073e3dd.tar.xz cache-7d532553ae18bfff1bec9e0df3fa66313073e3dd.tar.zst cache-7d532553ae18bfff1bec9e0df3fa66313073e3dd.zip |
Add raw API
Diffstat (limited to 'store.go')
-rw-r--r-- | store.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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() |