Skip to content

Commit

Permalink
Code review changes part 5
Browse files Browse the repository at this point in the history
  • Loading branch information
mchavez committed Sep 3, 2024
1 parent cb1aa5e commit 9492a92
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/uhttp/dbcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func NewDBCache(ctx context.Context, cfg CacheConfig) (*DBCache, error) {
id INTEGER PRIMARY KEY,
key NVARCHAR,
hits INTEGER DEFAULT 0,
misses INTEGER DEFAULT 0,
misses INTEGER DEFAULT 0
);`)
if err != nil {
l.Debug("Failed to create cache table in database", zap.Error(err))
Expand All @@ -97,7 +97,7 @@ func NewDBCache(ctx context.Context, cfg CacheConfig) (*DBCache, error) {
)
defer cancel()

ticker := time.NewTicker(time.Duration(expirationTime))
ticker := time.NewTicker(time.Duration(expirationTime) * time.Second)
defer ticker.Stop()
for {
select {
Expand Down

0 comments on commit 9492a92

Please sign in to comment.