home » zplus/freepost.git
Author zPlus <zplus@peers.community> 2019-02-01 20:22:51
Committer zPlus <zplus@peers.community> 2019-02-01 20:22:51
Commit 1b8bd39 (patch)
Tree f22920c
Parent(s)

Fix #80 Vote caching problem


commits diff: 231a89f..1b8bd39
1 file changed, 12 insertions, 0 deletionsdownload


Diffstat
-rwxr-xr-x freepost/__init__.py 12

Diff options
View
Side
Whitespace
Context lines
Inter-hunk lines
+12/-0 M   freepost/__init__.py
index 9aeb8f8..aef0098
old size: 26K - new size: 27K
@@ -127,6 +127,12 @@ def homepage ():
127 127 else:
128 128 posts = []
129 129
130 + # Disable browser caching
131 + # Fix issue: https://notabug.org/zPlus/freepost/issues/80
132 + response.set_header('cache-control', 'no-cache, no-store, must-revalidate')
133 + response.set_header('pragma', 'no-cache')
134 + response.set_header('expires', '0')
135 +
130 136 return template ('homepage.html', posts=posts, sort=sort)
131 137
132 138 # TODO implement this
@@ -501,6 +507,12 @@ def post_thread (hash_id):
501 507
502 508 comments = children ()
503 509
510 + # Disable browser caching
511 + # Fix issue: https://notabug.org/zPlus/freepost/issues/80
512 + response.set_header('cache-control', 'no-cache, no-store, must-revalidate')
513 + response.set_header('pragma', 'no-cache')
514 + response.set_header('expires', '0')
515 +
504 516 return template (
505 517 'post.html',
506 518 post=post,