Skip to content

Commit

Permalink
feat: do not update cache if encoded data is null
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Gleich <[email protected]>
  • Loading branch information
gleich committed Dec 1, 2024
1 parent 616908a commit a82fd41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func (c *Cache[T]) Update(data T) {
lumber.Error(err, "failed to json marshal new data")
return
}
if string(old) != string(new) {
if string(old) != string(new) && string(new) != "null" {
c.data = data
c.updated = time.Now()
updated = true
Expand Down

0 comments on commit a82fd41

Please sign in to comment.