Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCache ¶
func NewCache(size int, ttl int, dataType string) stored_requests.CacheJSON
NewCache returns an in-memory Cache which evicts items if:
1. They haven't been used within the TTL. 2. The cache is too large. This will cause the least recently used items to be evicted.
For no TTL, use ttlSeconds <= 0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.