Skip to content

Commit

Permalink
fix(storers): default storer to use for surrogate
Browse files Browse the repository at this point in the history
  • Loading branch information
darkweak committed Sep 19, 2024
1 parent 22abb94 commit 65959dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/surrogate/providers/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ func (s *baseStorage) init(config configurationtypes.AbstractConfigurationInterf

s.Storage = storer
} else {
s.logger.Debugf("Try to load the storer %s as surrogate backend", defaultStorerName)
storer := core.GetRegisteredStorer(defaultStorerName)
if storer == nil {
config.GetLogger().Errorf("Impossible to retrieve the storers %s for the surrogate-keys fallback to the default storage", configuration.SurrogateConfiguration.Storer)
Expand Down
2 changes: 1 addition & 1 deletion plugins/caddy/httpcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (s *SouinCaddyMiddleware) configurationPropertyMapper() error {
}

func isProviderEmpty(c configurationtypes.CacheProvider) bool {
return c.Configuration == nil && c.Path == "" && c.URL == ""
return !c.Found
}

// FromApp to initialize configuration from App structure.
Expand Down

0 comments on commit 65959dc

Please sign in to comment.