aboutsummaryrefslogtreecommitdiffstats
path: root/conn.go
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--conn.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/conn.go b/conn.go
index 5df57a3..784cc02 100644
--- a/conn.go
+++ b/conn.go
@@ -188,6 +188,10 @@ func (h *DB[K, V]) Get(key K, value V) (V, time.Duration, error) {
return value, ttl, err
}
+func (h *DB[K, V]) GetValue(key K) (V, time.Duration, error) {
+ return h.Get(key, zero[V]())
+}
+
func (h *DB[K, V]) Set(key K, value V, ttl time.Duration) error {
keyData, err := msgpack.Marshal(key)
if err != nil {