Skip to content

Commit

Permalink
Fix: don't cache pages if the user is logged in (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrueBrain authored Nov 14, 2020
1 parent c5badd5 commit 0f5e86d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion truewiki/views/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def view(user, page: str, if_modified_since) -> web.Response:
if status_code == 200:
metadata.LAST_TIME_RENDERED[namespaced_page] = time.time()

if cache_filename:
if not user and cache_filename:
# Cache the file on disk
os.makedirs(os.path.dirname(cache_filename), exist_ok=True)
with open(cache_filename, "w") as fp:
Expand Down

0 comments on commit 0f5e86d

Please sign in to comment.