Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 64953E00FC9; Fri, 25 Sep 2015 11:07:49 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.212.178 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id AFFCDE00AD1 for ; Fri, 25 Sep 2015 11:07:47 -0700 (PDT) Received: by wicge5 with SMTP id ge5so31465797wic.0 for ; Fri, 25 Sep 2015 11:07:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=KDg4zTjMZ469YMLl7YqouEIX09f87Hsr0CFr9tmrvpg=; b=k2wrXVYxvxbDx+7I9gKlcu56qJo4VgyMXfYGX4PgxFHTseNTE46SMLZEapMMXv2EjF Z6x3G5GaKx2nicexT4Awq7Ov8x4153HX9JAiM16CKFEFRmEEi1LFtH9OefkBA2zX6UUd fSRuCQRXAhkhW+iDibzafe7SG2dmo7812BLvqHo4zlPTTF94E3Z4bN4d0iSt6EWWa21e 2UDXBpgK01ICQbpVHFhx09ITEhnO8O6Nly7ceQkiIbX8pWC3TLOODdt8VZkyxj0Sib55 zoJKiyw6y3JSFl/VJdP46Vpx/TA2mxft9hHOyRFan0NKpHHLNBqjs+xcpo35AIg1XeN3 mswQ== X-Gm-Message-State: ALoCoQny2tx7XB+xCAyKAM/bdWg/zRY8plZct3TG2YaVQtuIvV0ajdoimr7+EjWx2SqaNPD0Mn4I X-Received: by 10.180.87.162 with SMTP id az2mr4987391wib.62.1443204466713; Fri, 25 Sep 2015 11:07:46 -0700 (PDT) Received: from draco.isw.intel.com ([83.217.123.106]) by smtp.gmail.com with ESMTPSA id uq5sm4511789wjc.3.2015.09.25.11.07.46 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 25 Sep 2015 11:07:46 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Fri, 25 Sep 2015 19:07:17 +0100 Message-Id: <1443204452-32244-7-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1443204452-32244-1-git-send-email-michael.g.wood@intel.com> References: <1443204452-32244-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 06/21] toaster: add nocache option to the ToasterTable widget X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Sep 2015 18:07:49 -0000 Useful for skipping the cache mechanism when debugging. Simply append nocache=true to the end of the url with the table in it. Also adds a debug message if the table is using cached data. Signed-off-by: Michael Wood --- bitbake/lib/toaster/toastergui/widgets.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bitbake/lib/toaster/toastergui/widgets.py b/bitbake/lib/toaster/toastergui/widgets.py index aaa59c0..d7d5efd 100644 --- a/bitbake/lib/toaster/toastergui/widgets.py +++ b/bitbake/lib/toaster/toastergui/widgets.py @@ -253,11 +253,14 @@ class ToasterTable(TemplateView): search = request.GET.get("search", None) filters = request.GET.get("filter", None) orderby = request.GET.get("orderby", None) + nocache = request.GET.get("nocache", None) # Make a unique cache name cache_name = self.__class__.__name__ for key, val in request.GET.iteritems(): + if key == 'nocache': + continue cache_name = cache_name + str(key) + str(val) for key, val in kwargs.iteritems(): @@ -265,6 +268,10 @@ class ToasterTable(TemplateView): # No special chars allowed in the cache name apart from dash cache_name = re.sub(r'[^A-Za-z0-9-]', "", cache_name) + + if nocache: + cache.delete(cache_name) + data = cache.get(cache_name) if data: -- 2.1.4