Skip to content

Commit

Permalink
Merge branch 'master' into DOC-4200-tces-for-aggregation-query-page
Browse files Browse the repository at this point in the history
  • Loading branch information
dwdougherty authored Sep 30, 2024
2 parents aaafad6 + 2e46613 commit a139435
Show file tree
Hide file tree
Showing 30 changed files with 2,344 additions and 1,766 deletions.
1 change: 1 addition & 0 deletions .github/wordlist.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
APM
ARGV
BFCommands
CacheImpl
CFCommands
CMSCommands
ClusterNode
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# this speeds up coverage with Python 3.12: https://github.com/nedbat/coveragepy/issues/1665
COVERAGE_CORE: sysmon
REDIS_IMAGE: redis:7.4-rc2
REDIS_IMAGE: redis:latest
REDIS_STACK_IMAGE: redis/redis-stack-server:latest

jobs:
Expand Down
1 change: 0 additions & 1 deletion dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
black==24.3.0
cachetools
click==8.0.4
flake8-isort
flake8
Expand Down
2 changes: 0 additions & 2 deletions docs/examples/connection_examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@
},
{
"cell_type": "markdown",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"### By default this library uses the RESP 2 protocol. To enable RESP3, set protocol=3."
]
Expand Down
32 changes: 32 additions & 0 deletions docs/resp3_features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,35 @@ This means that should you want to perform something, on a given push notificati
>> p = r.pubsub(push_handler_func=our_func)
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.

Client-side caching
-------------------

Client-side caching is a technique used to create high performance services.
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.
For more information please check `official Redis documentation <https://redis.io/docs/latest/develop/use/client-side-caching/>`_.
Please notice that this feature only available with RESP3 protocol enabled in sync client only. Supported in standalone, Cluster and Sentinel clients.

Basic usage:

Enable caching with default configuration:

.. code:: python
>>> import redis
>>> from redis.cache import CacheConfig
>>> r = redis.Redis(host='localhost', port=6379, protocol=3, cache_config=CacheConfig())
The same interface applies to Redis Cluster and Sentinel.

Enable caching with custom cache implementation:

.. code:: python
>>> import redis
>>> from foo.bar import CacheImpl
>>> r = redis.Redis(host='localhost', port=6379, protocol=3, cache=CacheImpl())
CacheImpl should implement a `CacheInterface` specified in `redis.cache` package.

More comprehensive documentation soon will be available at `official Redis documentation <https://redis.io/docs/latest/>`_.
Loading

0 comments on commit a139435

Please sign in to comment.