mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Clearing entity cache after maintenance
This commit is contained in:
parent
b96f0cfc08
commit
31c6fe6243
@ -110,6 +110,9 @@ def invalidate_caches(scrobbletime):
|
||||
log(f"Invalidated {cleared} of {cleared+kept} DB cache entries")
|
||||
|
||||
|
||||
def invalidate_entity_cache():
|
||||
entitycache.clear()
|
||||
|
||||
|
||||
def trim_cache():
|
||||
ramprct = psutil.virtual_memory().percent
|
||||
|
@ -6,7 +6,7 @@ from datetime import datetime
|
||||
|
||||
from ..globalconf import data_dir
|
||||
|
||||
from .dbcache import cached_wrapper, cached_wrapper_individual
|
||||
from .dbcache import cached_wrapper, cached_wrapper_individual, invalidate_entity_cache
|
||||
|
||||
from doreah.logging import log
|
||||
from doreah.regular import runhourly
|
||||
@ -652,6 +652,11 @@ def clean_db():
|
||||
|
||||
|
||||
|
||||
# Clear caches
|
||||
invalidate_entity_cache()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user