diff --git a/dev/releases/branch.yml b/dev/releases/branch.yml index 61415ea..f408e30 100644 --- a/dev/releases/branch.yml +++ b/dev/releases/branch.yml @@ -1,3 +1,3 @@ - "[Bugix] Improved signal handling" -- "[Bugix] Fixed constant re-caching of all-time stats" -- "[Performance] Disabled caches per default" +- "[Bugix] Fixed constant re-caching of all-time stats. significantly increasing page load speed" +- "[Logging] Disabled cache information when cache is not used" diff --git a/maloja/database/jinjaview.py b/maloja/database/jinjaview.py index ab19e73..80d1b67 100644 --- a/maloja/database/jinjaview.py +++ b/maloja/database/jinjaview.py @@ -23,7 +23,8 @@ class JinjaDBConnection: return self def __exit__(self, exc_type, exc_value, exc_traceback): self.conn.close() - log(f"Generated page with {self.hits}/{self.hits+self.misses} local Cache hits",module="debug_performance") + if malojaconfig['USE_REQUEST_CACHE']: + log(f"Generated page with {self.hits}/{self.hits+self.misses} local Cache hits",module="debug_performance") del self.cache def __getattr__(self,name): originalmethod = getattr(database,name) diff --git a/maloja/globalconf.py b/maloja/globalconf.py index 2ab8f09..f150097 100644 --- a/maloja/globalconf.py +++ b/maloja/globalconf.py @@ -150,7 +150,7 @@ malojaconfig = Configuration( "cache_expire_negative":(tp.Integer(), "Image Cache Negative Expiration", 5, "Days until failed image fetches are reattempted"), "db_max_memory":(tp.Integer(min=0,max=100), "RAM Percentage soft limit", 80, "RAM Usage in percent at which Maloja should no longer increase its database cache."), "use_request_cache":(tp.Boolean(), "Use request-local DB Cache", False), - "use_global_cache":(tp.Boolean(), "Use global DB Cache", False) + "use_global_cache":(tp.Boolean(), "Use global DB Cache", True) }, "Fluff":{ "scrobbles_gold":(tp.Integer(), "Scrobbles for Gold", 250, "How many scrobbles a track needs to be considered 'Gold' status"),