-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Streamline client side caching API typing (#3216)
* Streamline client side caching API typing Streamline the typing of the client side caching API. Some of the methods are defining commands of type `str`, while in reality tuples are being sent for those parameters. Add client side cache tests for Sentinels. In order to make this work, fix the sentinel configuration in the docker-compose stack. Add a test for client side caching with a truly custom cache, not just injecting our internal cache structure as custom. Add a test for client side caching where two different types of commands use the same key, to make sure they invalidate each others cached data. * Fixes after running tests against RE * More test cases * Fix async tests * Tests for raw commands * Change terminology for allow/deny lists * Add test for single connection * Make sure flushing the cache works everywhere * Reenable some tests for cluster too * Align cache typings at abstract level * Use Sequence instead of Iterable for types * Remove some exceptions in favor of ifs --------- Co-authored-by: Gabriel Erzse <gabriel.erzse@redis.com>
- Loading branch information
1 parent
c40e08f
commit 04e8698
Showing
13 changed files
with
861 additions
and
186 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
click==8.0.4 | ||
black==24.3.0 | ||
cachetools | ||
flake8==5.0.4 | ||
flake8-isort==6.0.0 | ||
flynt~=0.69.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
sentinel monitor redis-py-test 127.0.0.1 6379 2 | ||
sentinel resolve-hostnames yes | ||
sentinel monitor redis-py-test redis 6379 2 | ||
sentinel down-after-milliseconds redis-py-test 5000 | ||
sentinel failover-timeout redis-py-test 60000 | ||
sentinel parallel-syncs redis-py-test 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.