perserve site stats on cache.clear()
parent
67f71997b6
commit
829db5684b
|
@ -173,8 +173,10 @@ def move_acc(v:User, new_id, old_id):
|
||||||
|
|
||||||
g.db.commit()
|
g.db.commit()
|
||||||
|
|
||||||
|
stats = cache.get(f'{SITE}_stats')
|
||||||
online = cache.get(CHAT_ONLINE_CACHE_KEY)
|
online = cache.get(CHAT_ONLINE_CACHE_KEY)
|
||||||
cache.clear()
|
cache.clear()
|
||||||
|
cache.set(f'{SITE}_stats', stats)
|
||||||
cache.set(CHAT_ONLINE_CACHE_KEY, online)
|
cache.set(CHAT_ONLINE_CACHE_KEY, online)
|
||||||
|
|
||||||
return redirect(f"/id/{old_id}")
|
return redirect(f"/id/{old_id}")
|
||||||
|
|
Loading…
Reference in New Issue