mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-23 02:26:42 +00:00
GODT-1431 Prevent watcher when not using disk on cache
- change: Rename Cacher -> MsgCachePool - change: Do not run watcher when using memory cache - add: Allow to cancel cacher jobs (added context) - change: Fix behavior on context cancel (was causing no internet)
This commit is contained in:
6
internal/store/cache/disk.go
vendored
6
internal/store/cache/disk.go
vendored
@ -34,6 +34,12 @@ import (
|
||||
|
||||
var ErrLowSpace = errors.New("not enough free space left on device")
|
||||
|
||||
// IsOnDiskCache will return true if Cache is type of onDiskCache.
|
||||
func IsOnDiskCache(c Cache) bool {
|
||||
_, ok := c.(*onDiskCache)
|
||||
return ok
|
||||
}
|
||||
|
||||
type onDiskCache struct {
|
||||
path string
|
||||
opts Options
|
||||
|
||||
Reference in New Issue
Block a user