perserve site stats on cache.clear()

pull/83/head
Aevann 2022-12-25 08:14:30 +02:00
parent 67f71997b6
commit 829db5684b
1 changed files with 2 additions and 0 deletions

View File

@ -173,8 +173,10 @@ def move_acc(v:User, new_id, old_id):
g.db.commit()
stats = cache.get(f'{SITE}_stats')
online = cache.get(CHAT_ONLINE_CACHE_KEY)
cache.clear()
cache.set(f'{SITE}_stats', stats)
cache.set(CHAT_ONLINE_CACHE_KEY, online)
return redirect(f"/id/{old_id}")