sdk taking shape.

This commit is contained in:
fiatjaf
2023-10-30 19:23:58 -03:00
parent 234d825e43
commit c506cc0f8b
8 changed files with 133 additions and 18 deletions

10
sdk/cache/interface.go vendored Normal file
View File

@@ -0,0 +1,10 @@
package cache
import "time"
type Cache32[V any] interface {
Get(k string) (v V, ok bool)
Delete(k string)
Set(k string, v V) bool
SetWithTTL(k string, v V, d time.Duration) bool
}