Skip to content

Commit a139435

Browse files
authored
Merge branch 'master' into DOC-4200-tces-for-aggregation-query-page
2 parents aaafad6 + 2e46613 commit a139435

30 files changed

+2344
-1766
lines changed

.github/wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
APM
22
ARGV
33
BFCommands
4+
CacheImpl
45
CFCommands
56
CMSCommands
67
ClusterNode

.github/workflows/integration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ env:
2727
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
2828
# this speeds up coverage with Python 3.12: https://github.com/nedbat/coveragepy/issues/1665
2929
COVERAGE_CORE: sysmon
30-
REDIS_IMAGE: redis:7.4-rc2
30+
REDIS_IMAGE: redis:latest
3131
REDIS_STACK_IMAGE: redis/redis-stack-server:latest
3232

3333
jobs:

dev_requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
black==24.3.0
2-
cachetools
32
click==8.0.4
43
flake8-isort
54
flake8

docs/examples/connection_examples.ipynb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,7 @@
6969
},
7070
{
7171
"cell_type": "markdown",
72-
"execution_count": null,
7372
"metadata": {},
74-
"outputs": [],
7573
"source": [
7674
"### By default this library uses the RESP 2 protocol. To enable RESP3, set protocol=3."
7775
]

docs/resp3_features.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,35 @@ This means that should you want to perform something, on a given push notificati
6767
>> p = r.pubsub(push_handler_func=our_func)
6868
6969
In the example above, upon receipt of a push notification, rather than log the message, in the case where specific text occurs, an IOError is raised. This example, highlights how one could start implementing a customized message handler.
70+
71+
Client-side caching
72+
-------------------
73+
74+
Client-side caching is a technique used to create high performance services.
75+
It utilizes the memory on application servers, typically separate from the database nodes, to cache a subset of the data directly on the application side.
76+
For more information please check `official Redis documentation <https://redis.io/docs/latest/develop/use/client-side-caching/>`_.
77+
Please notice that this feature only available with RESP3 protocol enabled in sync client only. Supported in standalone, Cluster and Sentinel clients.
78+
79+
Basic usage:
80+
81+
Enable caching with default configuration:
82+
83+
.. code:: python
84+
85+
>>> import redis
86+
>>> from redis.cache import CacheConfig
87+
>>> r = redis.Redis(host='localhost', port=6379, protocol=3, cache_config=CacheConfig())
88+
89+
The same interface applies to Redis Cluster and Sentinel.
90+
91+
Enable caching with custom cache implementation:
92+
93+
.. code:: python
94+
95+
>>> import redis
96+
>>> from foo.bar import CacheImpl
97+
>>> r = redis.Redis(host='localhost', port=6379, protocol=3, cache=CacheImpl())
98+
99+
CacheImpl should implement a `CacheInterface` specified in `redis.cache` package.
100+
101+
More comprehensive documentation soon will be available at `official Redis documentation <https://redis.io/docs/latest/>`_.

0 commit comments

Comments
 (0)