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

Method ScriptFlush

osscluster_commands.go:57–69  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

55}
56
57func (c *ClusterClient) ScriptFlush(ctx context.Context) *StatusCmd {
58 cmd := NewStatusCmd(ctx, "script", "flush")
59 _ = c.withProcessHook(ctx, cmd, func(ctx context.Context, _ Cmder) error {
60 err := c.ForEachShard(ctx, func(ctx context.Context, shard *Client) error {
61 return shard.ScriptFlush(ctx).Err()
62 })
63 if err != nil {
64 cmd.SetErr(err)
65 }
66 return nil
67 })
68 return cmd
69}
70
71func (c *ClusterClient) ScriptExists(ctx context.Context, hashes ...string) *BoolSliceCmd {
72 args := make([]interface{}, 2+len(hashes))

Callers

nothing calls this directly

Calls 6

ForEachShardMethod · 0.95
NewStatusCmdFunction · 0.85
withProcessHookMethod · 0.80
ErrMethod · 0.65
ScriptFlushMethod · 0.65
SetErrMethod · 0.65

Tested by

no test coverage detected