Compare commits

...

2 Commits
1.4.20 ... main

Author SHA1 Message Date
cebca5e53d Bump version: 1.4.20 → 1.4.21
All checks were successful
Build and Publish Docker Image / build-and-push (push) Successful in 1m6s
2026-04-06 17:32:40 +01:00
ddc6b12888 fix(cache): invalidate accounts and home caches after account deletion
Explicitly clear the cached views and memoized data for the user's
accounts and home pages following a successful account deletion. This
prevents stale data from appearing in the UI and ensures statistics are
accurately recalculated.
2026-04-06 17:32:36 +01:00
3 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,5 @@
[tool.bumpversion]
current_version = "1.4.20"
current_version = "1.4.21"
commit = true
tag = true
tag_name = "{new_version}"

View File

@ -1 +1 @@
1.4.20
1.4.21

6
app.py
View File

@ -301,6 +301,12 @@ def delete_account() -> Response:
account_id = request.form.get("id")
base_url = app.config["BACKEND_URL"]
delete_user_account(base_url, session["auth_credentials"], account_id)
# Clear cache for user accounts route
cache.delete(f"view/{session['username']}/accounts")
cache.delete_memoized(user_accounts, key_prefix=make_cache_key)
# Clear home page cache to remove expired account from stats
cache.delete(f"view/{session['username']}/home")
cache.delete_memoized(home, key_prefix=make_cache_key)
# Run the NPM config update in a background thread to remove the deleted account's redirect
thread = threading.Thread(target=_update_npm_config_in_background, args=(session["auth_credentials"],))
thread.start()