import "github.com/LuleaUniversityOfTechnology/2018-project-roaster/analyze/cache"
Package cache implements a simple thread-safe cache with expiration.
type Cache struct {
// contains filtered or unexported fields
}
Cache is a thread-safe cache that holds objects with expiration.
New returns a new cache with a clean up routine.
Get returns a object from the cache using the provided key. The key is hashed using a hash function before lookup.
Set adds the object to the cache using the provided key. The key is hashed with a hash function before insertion.
type Item struct {
// contains filtered or unexported fields
}
Item represents a saved object in the cache. The object has a TTL that the clean up routine uses to check if the object has expired.
Package cache imports 4 packages (graph) and is imported by 2 packages. Updated 2019-01-14. Refresh now. Tools for package owners.