// RecalculateCaches forces all TopN caches to be updated. Used mainly for integration tests.
RecalculateCaches forces all TopN caches to be updated. Used mainly for integration tests.
// RecalculateCaches forces all TopN caches to be updated . Used mainly for integration tests .
func (api *API) RecalculateCaches(ctx context.Context) error {
	span, _ := tracing.StartSpanFromContext(ctx, "API.RecalculateCaches")
	defer span.Finish()
	if err := api.validate(apiRecalculateCaches); err != nil {
		return errors.Wrap(err, "validating api method")
	}
	err := api.server.SendSync(&RecalculateCaches{})
	if err != nil {
		return errors.Wrap(err, "broacasting message")
	}
	api.holder.recalculateCaches()
	return nil
}
func ( api * API ) RecalculateCaches ( ctx context . Context ) error { span , _ := tracing . StartSpanFromContext ( ctx , " " ) defer span . Finish ( ) if err := api . validate ( apiRecalculateCaches ) ; err != nil { return errors . Wrap ( err , " " ) } err := api . server . SendSync ( & RecalculateCaches { } ) if err != nil { return errors . Wrap ( err , " " ) } api . holder . recalculateCaches ( ) return nil }
RecalculateCaches forces all TopN caches to be updated.
RecalculateCaches forces all TopN caches to be updated .