diff --git a/app.py b/app.py
index 7e8f32b7dabc0226dcc5eac6620f26b8746d9e7c..31b6bf75e4f06d377d2cdbedc9e73f164863f764 100644
--- a/app.py
+++ b/app.py
@@ -28,9 +28,9 @@ def append_with_leading_clean(orig, content):
 
 # Return the corresponding user name for an id.
 async def cache_name_from_id(c, i):
-    if not cache.get(i):
-        r = await c.get_user_info(i, require=aiotieba.enums.ReqUInfo.USER_NAME)
-        cache.set(i, r)
+    if not cache.get(str(i)):
+        r = await c.get_user_info(i, require=aiotieba.enums.ReqUInfo.NICK_NAME)
+        cache.set(str(i), r)
 
 # Normalize unicode characters to ASCII form.
 def normalize_utf8(s):
@@ -100,7 +100,7 @@ async def _jinja2_filter_translate(frags, reply_id=0):
     htmlfmt = ''
 
     if reply_id:
-        htmlfmt += f'<a href="/home/main?id={reply_id}">@{ cache.get(reply_id) }</a> '
+        htmlfmt += f'<a href="/home/main?id={reply_id}">@{ cache.get(str(reply_id)) }</a> '
     
     for i in range(len(frags)):
         frag = frags[i]
@@ -158,7 +158,7 @@ async def thread_view(tid):
         for floor in thread_info:
             for comment in floor.comments:
                 available_users.append(comment.author_id)
-                cache.set(comment.author_id, comment.user.user_name)
+                cache.set(str(comment.author_id), comment.user.show_name)
         
         all_users = {}
         for floor in thread_info:
diff --git a/proxify.py b/proxify.py
index 0aff2b35d87e1633e98d15132e8bb437a3983a76..e4f705fa28bfe7dc07dab05d8a7934e59eb4e1a7 100644
--- a/proxify.py
+++ b/proxify.py
@@ -108,9 +108,8 @@ class Asgiproxify():
         task = asyncio.create_task(reverse_proxy_task())
 
         ev = await receive()
-        if ev['type'] == 'http.disconnect':
-            task.cancel()
-            return
+        task.cancel()
+        return
 
     async def __call__(self, scope, receive, send):
         if scope['type'] != 'http':
diff --git a/shared.py b/shared.py
index 6b5bbac12bbf38cebaf1229e25fbae6bbd9508e7..93c8a0867b8bfaccd344cbcef0cb164e19594e12 100644
--- a/shared.py
+++ b/shared.py
@@ -27,5 +27,9 @@ app.config['TESTING'] = False
 
 ######################################################################
 
+app.config['CACHE_DEFAULT_TIMEOUT'] = 60
+
+#app.config['CACHE_TYPE'] = 'RedisCache'
 app.config['CACHE_TYPE'] = 'SimpleCache'
+
 cache = Cache(app)