This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package cache | |
import ( | |
"sync" | |
"time" | |
) | |
// Cache is a basic in-memory key-value cache implementation. | |
type Cache[K comparable, V any] struct { | |
items map[K]V // The map storing key-value pairs. |