Documentation ¶ Index ¶ type Cache func NewCache[T any]() Cache[T] Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ This section is empty. Types ¶ type Cache ¶ type Cache[T any] interface { Add(key string, value *T) error Get(key string) (*T, error) Remove(key string) } func NewCache ¶ func NewCache[T any]() Cache[T] NewCache creates a new instance of Cache with a specified type. It initializes the cache with a default expiration time of 60 minutes and a cleanup interval of 10 minutes. T: The type of the items to be stored in the cache. Returns: A new instance of Cache with the specified type. Source Files ¶ View all Source files cache.go Click to show internal directories. Click to hide internal directories.