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] 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"
|
||||
|
@ -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)
|
||||
|
@ -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"),
|
||||
|
Loading…
Reference in New Issue
Block a user