Replaced cache trimming with full clear for now

This commit is contained in:
krateng 2022-04-12 05:33:03 +02:00
parent b8aa2a562e
commit cabfa298b9
3 changed files with 6 additions and 5 deletions

View File

@ -4,7 +4,7 @@
# you know what f*ck it
# this is hardcoded for now because of that damn project / package name discrepancy
# i'll fix it one day
VERSION = "3.0.0-beta.5"
VERSION = "3.0.0-beta.6"
HOMEPAGE = "https://github.com/krateng/maloja"

View File

@ -114,9 +114,10 @@ def trim_cache():
log(f"{ramprct}% RAM usage, reducing caches!")
ratio = 0.6
targetsize = max(int(len(cache) * ratio),50)
log(f"Reducing to {targetsize} entries")
cache.set_size(targetsize)
cache.set_size(HIGH_NUMBER)
#log(f"Reducing to {targetsize} entries")
#cache.set_size(targetsize)
#cache.set_size(HIGH_NUMBER)
cache.clear()
#log(f"New RAM usage: {psutil.virtual_memory().percent}%")
print_stats()

View File

@ -1,6 +1,6 @@
[project]
name = "malojaserver"
version = "3.0.0-beta.5"
version = "3.0.0-beta.6"
description = "Self-hosted music scrobble database"
readme = "./README.md"
requires-python = ">=3.6"