Coverage for paperless/db_cache.py: 0%

10 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-10-10 09:07 +0000

1from cachalot.api import invalidate as cachalot_invalidate 

2from cachalot.utils import get_query_cache_key 

3from cachalot.utils import get_table_cache_key 

4 

5PREFIX = "pngx_cachalot_" 

6 

7 

8def custom_get_query_cache_key(compiler): 

9 return PREFIX + get_query_cache_key(compiler) 

10 

11 

12def custom_get_table_cache_key(db_alias, table): 

13 return PREFIX + get_table_cache_key(db_alias, table) 

14 

15 

16def invalidate_db_cache() -> None: 

17 return cachalot_invalidate(cache_alias="read-cache")