From patchwork Wed Jul 20 20:36:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zygmunt Krynicki X-Patchwork-Id: 2888 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 0067F2405D for ; Wed, 20 Jul 2011 20:36:29 +0000 (UTC) Received: from mail-qy0-f180.google.com (mail-qy0-f180.google.com [209.85.216.180]) by fiordland.canonical.com (Postfix) with ESMTP id C1E58A187C5 for ; Wed, 20 Jul 2011 20:36:28 +0000 (UTC) Received: by qyk30 with SMTP id 30so440941qyk.11 for ; Wed, 20 Jul 2011 13:36:28 -0700 (PDT) Received: by 10.229.68.200 with SMTP id w8mr7989793qci.114.1311194188276; Wed, 20 Jul 2011 13:36:28 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.229.217.78 with SMTP id hl14cs123558qcb; Wed, 20 Jul 2011 13:36:28 -0700 (PDT) Received: by 10.227.156.70 with SMTP id v6mr8082516wbw.21.1311194187427; Wed, 20 Jul 2011 13:36:27 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id fm18si1192367wbb.110.2011.07.20.13.36.26; Wed, 20 Jul 2011 13:36:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) client-ip=91.189.90.139; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) smtp.mail=bounces@canonical.com Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1QjdVK-00079O-Mi for ; Wed, 20 Jul 2011 20:36:26 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id A519B2EA003 for ; Wed, 20 Jul 2011 20:36:26 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: lava-server X-Launchpad-Branch: ~linaro-validation/lava-server/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 213 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-validation/lava-server/trunk] Rev 213: Enable site-wide caching for anonymous users Message-Id: <20110720203626.32572.39784.launchpad@loganberry.canonical.com> Date: Wed, 20 Jul 2011 20:36:26 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="13468"; Instance="initZopeless config overlay" X-Launchpad-Hash: 9be93f4943ad5429c34505001ef8a502309c15d2 ------------------------------------------------------------ revno: 213 committer: Zygmunt Krynicki branch nick: trunk timestamp: Wed 2011-07-20 22:29:51 +0200 message: Enable site-wide caching for anonymous users modified: lava_server/settings/common.py --- lp:lava-server https://code.launchpad.net/~linaro-validation/lava-server/trunk You are subscribed to branch lp:lava-server. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-validation/lava-server/trunk/+edit-subscription === modified file 'lava_server/settings/common.py' --- lava_server/settings/common.py 2011-07-13 10:59:13 +0000 +++ lava_server/settings/common.py 2011-07-20 20:29:51 +0000 @@ -57,7 +57,9 @@ 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.middleware.cache.UpdateCacheMiddleware', 'django.middleware.common.CommonMiddleware', + 'django.middleware.cache.FetchFromCacheMiddleware', 'django.middleware.transaction.TransactionMiddleware', ] @@ -126,3 +128,8 @@ # This is fixed in south 0.7.1, if we upgrade past that it's safe to # remove this line. SKIP_SOUTH_TESTS = True + + +CACHE_BACKEND = "locmem://" +CACHE_MIDDLEWARE_SECONDS = 60 * 60 +CACHE_MIDDLEWARE_ANONYMOUS_ONLY = True