MCPcopy
hub / github.com/redis/go-redis / RunRO

Method RunRO

script.go:203–209  ·  view source on GitHub ↗

RunRO optimistically uses EVALSHA_RO to run the script. If script does not exist it is retried using EVAL_RO.

(ctx context.Context, c Scripter, keys []string, args ...interface{})

Source from the content-addressed store, hash-verified

201// RunRO optimistically uses EVALSHA_RO to run the script. If script does not exist
202// it is retried using EVAL_RO.
203func (s *Script) RunRO(ctx context.Context, c Scripter, keys []string, args ...interface{}) *Cmd {
204 r := s.EvalShaRO(ctx, c, keys, args...)
205 if errors.Is(r.Err(), ErrNoScript) {
206 return s.EvalRO(ctx, c, keys, args...)
207 }
208 return r
209}

Calls 3

EvalShaROMethod · 0.95
EvalROMethod · 0.95
ErrMethod · 0.65