diff --git a/maloja/__pkginfo__.py b/maloja/__pkginfo__.py index b8da361..3c9f262 100644 --- a/maloja/__pkginfo__.py +++ b/maloja/__pkginfo__.py @@ -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.4" +VERSION = "3.0.0-beta.5" HOMEPAGE = "https://github.com/krateng/maloja" diff --git a/maloja/database/dbcache.py b/maloja/database/dbcache.py index ed93eb2..5654ef8 100644 --- a/maloja/database/dbcache.py +++ b/maloja/database/dbcache.py @@ -113,10 +113,12 @@ def trim_cache(): if ramprct > malojaconfig["DB_MAX_MEMORY"]: log(f"{ramprct}% RAM usage, reducing caches!") ratio = 0.6 - targetsize = max(int(len(cache) * ratio),100) + targetsize = max(int(len(cache) * ratio),50) + log(f"Reducing to {targetsize} entries") cache.set_size(targetsize) cache.set_size(HIGH_NUMBER) - log(f"New RAM usage: {psutil.virtual_memory().percent}%") + #log(f"New RAM usage: {psutil.virtual_memory().percent}%") + print_stats() diff --git a/pyproject.toml b/pyproject.toml index c3d1c74..32cf53d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "malojaserver" -version = "3.0.0-beta.4" +version = "3.0.0-beta.5" description = "Self-hosted music scrobble database" readme = "./README.md" requires-python = ">=3.6"