From 246608f5e09d948164c114985b17f3c1b41b6984 Mon Sep 17 00:00:00 2001 From: krateng Date: Fri, 31 Mar 2023 05:33:30 +0200 Subject: [PATCH] Album updates now properly evict caches --- maloja/database/sqldb.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/maloja/database/sqldb.py b/maloja/database/sqldb.py index 95f5841..f511488 100644 --- a/maloja/database/sqldb.py +++ b/maloja/database/sqldb.py @@ -6,7 +6,7 @@ from datetime import datetime from threading import Lock from ..pkg_global.conf import data_dir -from .dbcache import cached_wrapper, cached_wrapper_individual +from .dbcache import cached_wrapper, cached_wrapper_individual, invalidate_caches, invalidate_entity_cache from . import exceptions as exc from doreah.logging import log @@ -352,6 +352,11 @@ def add_track_to_album(track_id,album_id,replace=False,dbconn=None): ) result = dbconn.execute(op) + + invalidate_entity_cache() # because album info has changed + invalidate_caches() # changing album info of tracks will change album charts + + return True @connection_provider