Skip to content

Commit

Permalink
feat: debug log out cache changes
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Gleich <git@mattglei.ch>
  • Loading branch information
gleich committed Jul 27, 2024
1 parent eea32da commit 74a6ebf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ func (c *Cache[T]) Update(data T) {
var updated bool
c.mutex.Lock()
if !reflect.DeepEqual(data, c.data) {
lumber.Debug("caches are not the same for", c.Name)
old, _ := json.Marshal(c.data)
lumber.Debug("old cache:", string(old))
new, _ := json.Marshal(data)
lumber.Debug("new cache:", string(new))
c.data = data
c.updated = time.Now()
updated = true
Expand Down

0 comments on commit 74a6ebf

Please sign in to comment.