Skip to content

Commit

Permalink
fix: invalidate local cache
Browse files Browse the repository at this point in the history
  • Loading branch information
zenghur committed Mar 26, 2020
1 parent 858b381 commit 69f2d7d
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions freesia.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,15 +259,13 @@ func (f *Freesia) Del(keys ...string) error {
if err != nil {
return err
}
for _, key := range keys {
if err := f.cache.Del(key); err != nil {
return err
}
if err := f.pub(keys...); err != nil {
return err
}
return nil
}

func (f *Freesia) Pub(keys ...string) error {
func (f *Freesia) pub(keys ...string) error {
b, err := msgpack.Marshal(keys)
if err != nil {
return err
Expand Down

0 comments on commit 69f2d7d

Please sign in to comment.