From 316b443addb7ec55e27f571ef489f2c19afb3a82 Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 6 Jul 2026 14:38:56 +0200 Subject: added struct Item and keyowrd EXPIRE so now we can track expire time of items in the db --- redisDB.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'redisDB.go') diff --git a/redisDB.go b/redisDB.go index f21ac50..9138971 100644 --- a/redisDB.go +++ b/redisDB.go @@ -3,11 +3,15 @@ package main import ( "fmt" "sync" + "time" ) - +type Item struct { + Value any + ExpiresAt *time.Time +} type RedisDB struct { mu sync.Mutex - data map[string]any + data map[string]Item } type SimpleString string -- cgit v1.2.3