-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcache.go
More file actions
23 lines (18 loc) · 723 Bytes
/
Copy pathcache.go
File metadata and controls
23 lines (18 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package CovidSim
import (
"image"
"io"
)
type Cache interface {
io.Closer
// InvalidateUser will clear all caching for the specified user.
InvalidateUser(userID string) error
// AvatarCache is a cache of a user's avatar data.
AvatarCache(userID string, getAvatarFunc func(userID string) (image.Image, error)) (image.Image, error)
// HasMaskCache is a cache of whether the user has a mask.
HasMaskCache(userID string, hasMaskFunc func(userID string) (bool, error)) (bool, error)
// GenerationCooldown will enable a cooldown for userID.
GenerationCooldown(userID string) error
// GetGenerationCooldown will get whether there is a cooldown for this user.
GetGenerationCooldown(userID string) (bool, error)
}