Skip to content

Commit

Permalink
feat: write cacheData to files
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Gleich <[email protected]>
  • Loading branch information
gleich committed Jul 27, 2024
1 parent 48afd93 commit 33661a4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/cache/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ func (c *Cache[T]) writeToFile() {
}
defer file.Close()

b, err := json.Marshal(c.data)
b, err := json.Marshal(cacheData[T]{
Data: c.data,
Updated: c.updated,
})
if err != nil {
lumber.Error(err, "encoding data to json failed")
return
Expand Down

0 comments on commit 33661a4

Please sign in to comment.