mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Re-enabled cache per default
This commit is contained in:
parent
95f98370cf
commit
c55e12dd43
@ -1,3 +1,3 @@
|
|||||||
- "[Bugix] Improved signal handling"
|
- "[Bugix] Improved signal handling"
|
||||||
- "[Bugix] Fixed constant re-caching of all-time stats"
|
- "[Bugix] Fixed constant re-caching of all-time stats. significantly increasing page load speed"
|
||||||
- "[Performance] Disabled caches per default"
|
- "[Logging] Disabled cache information when cache is not used"
|
||||||
|
@ -23,7 +23,8 @@ class JinjaDBConnection:
|
|||||||
return self
|
return self
|
||||||
def __exit__(self, exc_type, exc_value, exc_traceback):
|
def __exit__(self, exc_type, exc_value, exc_traceback):
|
||||||
self.conn.close()
|
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
|
del self.cache
|
||||||
def __getattr__(self,name):
|
def __getattr__(self,name):
|
||||||
originalmethod = getattr(database,name)
|
originalmethod = getattr(database,name)
|
||||||
|
@ -150,7 +150,7 @@ malojaconfig = Configuration(
|
|||||||
"cache_expire_negative":(tp.Integer(), "Image Cache Negative Expiration", 5, "Days until failed image fetches are reattempted"),
|
"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."),
|
"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_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":{
|
"Fluff":{
|
||||||
"scrobbles_gold":(tp.Integer(), "Scrobbles for Gold", 250, "How many scrobbles a track needs to be considered 'Gold' status"),
|
"scrobbles_gold":(tp.Integer(), "Scrobbles for Gold", 250, "How many scrobbles a track needs to be considered 'Gold' status"),
|
||||||
|
Loading…
Reference in New Issue
Block a user