Skip to content

Commit

Permalink
initial istorage reference.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Lloyd committed Nov 4, 2020
1 parent 55d48f4 commit 34853d0
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions storage.go
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)
}

0 comments on commit 34853d0

Please sign in to comment.