File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change 11from valkey .asyncio .client import Valkey as AValkey
22
3- from django_valkey .base import BaseValkeyCache , AsyncBackendCommands
3+ from django_valkey .base import (
4+ BaseValkeyCache ,
5+ AsyncBackendCommands ,
6+ decorate_all_methods ,
7+ omit_exception ,
8+ )
49from django_valkey .async_cache .client .default import AsyncDefaultClient
510
611
12+ @decorate_all_methods (omit_exception )
13+ class DecoratedAsyncBackendCommands (AsyncBackendCommands ):
14+ pass
15+
16+
717class AsyncValkeyCache (
8- BaseValkeyCache [AsyncDefaultClient , AValkey ], AsyncBackendCommands
18+ BaseValkeyCache [AsyncDefaultClient , AValkey ], DecoratedAsyncBackendCommands
919):
1020 DEFAULT_CLIENT_CLASS = "django_valkey.async_cache.client.default.AsyncDefaultClient"
1121 is_async = True
Original file line number Diff line number Diff line change 11from valkey import Valkey
22
3- from django_valkey .base import BaseValkeyCache , BackendCommands
3+ from django_valkey .base import (
4+ BaseValkeyCache ,
5+ BackendCommands ,
6+ decorate_all_methods ,
7+ omit_exception ,
8+ )
49from django_valkey .client import DefaultClient
510
611
7- class ValkeyCache (BaseValkeyCache [DefaultClient , Valkey ], BackendCommands ):
12+ @decorate_all_methods (omit_exception )
13+ class DecoratedBackendCommands (BackendCommands ):
14+ pass
15+
16+
17+ class ValkeyCache (BaseValkeyCache [DefaultClient , Valkey ], DecoratedBackendCommands ):
818 DEFAULT_CLIENT_CLASS = "django_valkey.client.DefaultClient"
You can’t perform that action at this time.
0 commit comments