Skip to content

Commit 94074eb

Browse files
committed
Cloudflare cache Atom feeds for 10 minutes, not 2 minutes
1 parent 2925b7e commit 94074eb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

blog/feeds.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ def __call__(self, request, *args, **kwargs):
1616
response["Access-Control-Allow-Origin"] = "*"
1717
response["Access-Control-Allow-Methods"] = "GET, OPTIONS"
1818
response["Access-Control-Max-Age"] = "1000"
19-
# Tell CloudFlare to cache my feeds for 2 minutes
20-
response["Cache-Control"] = "s-maxage=%d" % (2 * 60)
19+
# Tell CloudFlare to cache my feeds
20+
cache_minutes = 10
21+
response["Cache-Control"] = "s-maxage=%d" % (cache_minutes * 60)
2122
return response
2223

2324
def item_link(self, item):

0 commit comments

Comments
 (0)