mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-07-16 17:25:11 -05:00
18 lines
468 B
Python
18 lines
468 B
Python
from cachalot.api import invalidate as cachalot_invalidate
|
|
from cachalot.utils import get_query_cache_key
|
|
from cachalot.utils import get_table_cache_key
|
|
|
|
PREFIX = "pngx_cachalot_"
|
|
|
|
|
|
def custom_get_query_cache_key(compiler):
|
|
return PREFIX + get_query_cache_key(compiler)
|
|
|
|
|
|
def custom_get_table_cache_key(db_alias, table):
|
|
return PREFIX + get_table_cache_key(db_alias, table)
|
|
|
|
|
|
def invalidate_db_cache():
|
|
return cachalot_invalidate(cache_alias="read-cache")
|