MCPcopy
hub / github.com/redis/redis-py / client_tracking_on

Method client_tracking_on

redis/commands/cluster.py:1202–1231  ·  view source on GitHub ↗

Enables the tracking feature of the Redis server, that is used for server assisted client side caching. When clientid is provided - in target_nodes only the node that owns the connection with this id should be provided. When clientid is not provided - target

(
        self,
        clientid: int | None = None,
        prefix: Sequence[KeyT] = [],
        bcast: bool = False,
        optin: bool = False,
        optout: bool = False,
        noloop: bool = False,
        target_nodes: "TargetNodesT" | None = "all",
    )

Source from the content-addressed store, hash-verified

1200 reason="Use client-side caching feature instead.",
1201 )
1202 async def client_tracking_on(
1203 self,
1204 clientid: int | None = None,
1205 prefix: Sequence[KeyT] = [],
1206 bcast: bool = False,
1207 optin: bool = False,
1208 optout: bool = False,
1209 noloop: bool = False,
1210 target_nodes: "TargetNodesT" | None = "all",
1211 ) -> ResponseT:
1212 """
1213 Enables the tracking feature of the Redis server, that is used
1214 for server assisted client side caching.
1215
1216 When clientid is provided - in target_nodes only the node that owns the
1217 connection with this id should be provided.
1218 When clientid is not provided - target_nodes can be any node.
1219
1220 For more information see https://redis.io/commands/client-tracking
1221 """
1222 return await self.client_tracking(
1223 True,
1224 clientid,
1225 prefix,
1226 bcast,
1227 optin,
1228 optout,
1229 noloop,
1230 target_nodes=target_nodes,
1231 )
1232
1233 @deprecated_function(
1234 version="7.2.0",

Callers

nothing calls this directly

Calls 1

client_trackingMethod · 0.80

Tested by

no test coverage detected