Skip to content

Commit 001ef7a

Browse files
committed
added getbytes to cache
1 parent 72ef92b commit 001ef7a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

datastore.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,10 @@ func (ds *Datastore) GetCacheValue(key string) (string, error) {
287287
val := ds.Cache.Get(key)
288288
return val.Result()
289289
}
290+
func (ds *Datastore) GetCacheBytes(key string) ([]byte, error) {
291+
val := ds.Cache.Get(key)
292+
return val.Bytes()
293+
}
290294

291295
func (ds *Datastore) SetCacheValue(key string, value interface{}, duration time.Duration) (string, error) {
292296
val := ds.Cache.Set(key, value, duration)

0 commit comments

Comments
 (0)