1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2024-06-04 23:10:42 +00:00
OpenDiablo2/d2common/d2interface/cache.go
dk 8809fb2c22
Made abstractiong for the file manager (#542)
I realized that the file manager is actually managing file access
to the archives, but it's doing so through the archive manager.

I've renamed it, it's now called ArchivedFileManager because that
is really what it is.
2020-07-05 00:00:00 -04:00

18 lines
363 B
Go

package d2interface
// Cache stores arbitrary data for fast retrieval
type Cache interface {
SetVerbose(verbose bool)
GetWeight() int
GetBudget() int
Insert(key string, value interface{}, weight int) error
Retrieve(key string) (interface{}, bool)
Clear()
}
// Cacher is something that has a cache
type Cacher interface {
ClearCache()
GetCache() Cache
}