Permalink
Browse files

Added setting for anon caching only, defaulting to true

  • Loading branch information...
Andreas Andreas
Andreas authored and Andreas committed May 3, 2009
1 parent 9f46212 commit 70c7267255ac963fa3a665711dcb81f80a415078
Showing with 2 additions and 0 deletions.
  1. +2 −0 staticgenerator/middleware.py
@@ -18,6 +18,8 @@ class StaticGeneratorMiddleware(object):
gen = StaticGenerator()
def process_response(self, request, response):
+ if getattr(settings, 'STATIC_GENERATOR_ANON_ONLY', True) == True and request.user.is_authenticated():
+ return response
if response.status_code == 200:
for url in self.urls:
if url.match(request.path_info):

0 comments on commit 70c7267

Please sign in to comment.