Diffstat (limited to 'internal')
| -rw-r--r-- | internal/router/client-cache.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/router/client-cache.go b/internal/router/client-cache.go index 56cd595..b930d5a 100644 --- a/internal/router/client-cache.go +++ b/internal/router/client-cache.go @@ -76,6 +76,11 @@ func (c *ClientCache) Close() error { return fmt.Errorf("fail to init transaction with db to dump cache: %w", err) } + if _, err = tx.Exec("delete from blog_likes;"); err != nil { + tx.Rollback() + return fmt.Errorf("fail to truncate table blog_likes: %w", err) + } + userIdBytes := make(map[string][]byte) sqlStatement := fmt.Sprintf(` |