-
Notifications
You must be signed in to change notification settings - Fork 601
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Mike Lloyd
committed
Nov 4, 2020
1 parent
55d48f4
commit 34853d0
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package bigcache | ||
|
||
import "io" | ||
|
||
// IStorage is used for streaming or storing the cache externally. | ||
type IStorage interface { | ||
// Prepare is intended to be a pre-export or pre-import state which can be called to prepare the cache and/or | ||
// storage implementation for saving or loading. | ||
Prepare() error | ||
// Save is intended to store or stream the cache in a given implementation. | ||
Save(io.Writer) (bool, error) | ||
// Load an external cache from storage or streaming provider. | ||
Load(io.Reader) (bool, error) | ||
} |