Skip to content

Commit

Permalink
fix: cache reload once
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoushilin authored and LinkinStars committed Jan 19, 2024
1 parent 6d93b7d commit 261b143
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions internal/service/plugin_common/plugin_common_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,16 +81,14 @@ func NewPluginCommonService(
if err != nil {
log.Errorf("parse plugin config failed: %s %v", pluginConfig.PluginSlugName, err)
}
}

err = plugin.CallCache(func(cache plugin.Cache) error {
if cache.Info().SlugName == pluginConfig.PluginSlugName {
data.Cache = cache
}
return nil
})
if err != nil {
log.Errorf("parse plugin cache failed: %s %v", pluginConfig.PluginSlugName, err)
}
err = plugin.CallCache(func(cache plugin.Cache) error {
data.Cache = cache
return nil
})
if err != nil {
log.Errorf("parse plugin cache failed: %v", err)
}
}

Expand Down

0 comments on commit 261b143

Please sign in to comment.