Rules Hub
Code Ruleset
Rule priority, scope & exceptions
Use this to align rules with the senior-level structure (P0/P1/P2, scope, exceptions/tradeoffs).
Document Redis script key placement requirements
Scripts that derive keys bypass client prefixing and may violate cluster slot constraints. Use supported key placement or explicitly document standalone, unnamespaced requirements at the script boundary.
Bad example
| 1 | await client.eval("return redis.call('GET', 'item:' .. ARGV[1])", [], [id]); |
Explanation (EN)
Scripts that derive keys bypass client prefixing and may violate cluster slot constraints. Use supported key placement or explicitly document standalone, unnamespaced requirements at the script boundary.
Objašnjenje (HR)
Scripts that derive keys bypass client prefixing and may violate cluster slot constraints. Use supported key placement or explicitly document standalone, unnamespaced requirements at the script boundary.
Good example
| 1 | await client.eval("return redis.call('GET', KEYS[1])", [itemKey(id)], []); |
Explanation (EN)
Document Redis script key placement requirements
Objašnjenje (HR)
Document Redis script key placement requirements
Notes (EN)
Scripts that derive keys bypass client prefixing and may violate cluster slot constraints. Use supported key placement or explicitly document standalone, unnamespaced requirements at the script boundary.
Bilješke (HR)
Primijeniti pri promjenama cachea, fallbacka i obrade skupova podataka.
Exceptions / Tradeoffs (EN)
A documented dedicated standalone instance can intentionally support derived keys; changing namespaces or cluster topology requires reworking scripts.
Iznimke / Tradeoffi (HR)
A documented dedicated standalone instance can intentionally support derived keys; changing namespaces or cluster topology requires reworking scripts.