Improve caching, move mutex to the cache implementation
This commit is contained in:
@@ -20,7 +20,7 @@ func NewApplication(ctx context.Context, cfg Config, logger *zap.Logger) (*Appli
|
||||
return nil, fmt.Errorf("new db: %w", err)
|
||||
}
|
||||
|
||||
cache := make(inmemorycache.Cache)
|
||||
cache := inmemorycache.NewCache()
|
||||
|
||||
repo, err := repository.NewConnLogs(ctx, db, cache, logger, cfg.UpdateInterval)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user