Return-Path: X-Original-To: apmail-cayenne-user-archive@www.apache.org Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8A3CECD8F for ; Fri, 3 Aug 2012 15:09:12 +0000 (UTC) Received: (qmail 36543 invoked by uid 500); 3 Aug 2012 15:09:12 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 36518 invoked by uid 500); 3 Aug 2012 15:09:12 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 36510 invoked by uid 99); 3 Aug 2012 15:09:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2012 15:09:12 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FSL_RCVD_USER,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of atlipall@gmail.com designates 209.85.216.171 as permitted sender) Received: from [209.85.216.171] (HELO mail-qc0-f171.google.com) (209.85.216.171) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Aug 2012 15:09:07 +0000 Received: by qcad1 with SMTP id d1so953432qca.16 for ; Fri, 03 Aug 2012 08:08:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=JHih26/oG0ZliZWc+a4Hyh7Ju1ScizENrQN8Yql8HU0=; b=eHvSjYdq7/Guau3Xun804qS4yPDJ/FGLEp741YzFEEaNFr0pEf1dPJTE7hzQCJ4Uo2 k/Y6e9dzkTZXhuM9gEIeCly5X9o69P/kURbAgt0IxRIG7e+mfZSZptQ/Y16gzFj/UwOv 3MktDizdwk/4KVF8tVJ6DYo5+Jd4tkPg99vWGa6nZBNy25AY5LNMP9ZUGRijrOZBfDSr gvIyl36/VY2uYFrhNxojoRuVPLjaDkVKFX602WDJhevvrri5z3jvYgC1v/IXLipuF3c6 KzgSMMi1jp0OfEqmiPJclV8j8IouAOn6DMo4RYxpqHuiqfB3UFO+7LbQ9kEZM8DT2bPn 5O7A== Received: by 10.229.135.67 with SMTP id m3mr998078qct.97.1344006526634; Fri, 03 Aug 2012 08:08:46 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.214.136 with HTTP; Fri, 3 Aug 2012 08:08:26 -0700 (PDT) In-Reply-To: References: From: =?ISO-8859-1?Q?Atli_P=E1ll_Hafsteinsson?= Date: Fri, 3 Aug 2012 15:08:26 +0000 Message-ID: Subject: Re: Multiple application using same database, cache issue To: user@cayenne.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Hi, thanx for the reply. I am using oscache and set the "cayenne.default.refresh =3D 20" but queries seem to be cached longer that 20 sec. I do not explicitly set the cache group form my queries, do I need to do that or do they end up in some default group? Regards, Atli P=E1ll Hafsteinsson atlipall@gmail.com On Fri, Aug 3, 2012 at 2:42 PM, Andrus Adamchik wr= ote: > Hi there, > > So per http://cayenne.apache.org/doc/caching-and-fresh-data.html we have = object cache and query cache. We are planning to align the two at some poin= t with common config and management facilities. As of now object-level cach= e is not "managed". So you can't expire things from it, only refresh explic= itly. > > However there's query cache that can be fully managed, and maybe that's w= hat you want. So whenever you need a group of objects, you just run a query= with a certain cache group and cache policy. Depending in the cache config= uration, it will either be immediately returned from cache, or refetched. A= nd a refetch would update the object cache as a side effect. Personally wit= h query cache I barely ever look back at the object cache. > > Andrus > > On Aug 3, 2012, at 5:12 PM, Atli P=E1ll Hafsteinsson wrote: > >> Hi >> >> I have two separate cayenne applications reading and writing to the >> same database. The object cache is not shared between those >> applications so when data is written to the db in one application it >> is not immediately reflected in the the other application. Can I turn >> of the cache (there is not that much traffic) or somehow set the >> expiration time to a few seconds? >> >> Regards, >> Atli P=E1ll Hafsteinsson >> atlipall@gmail.com >> >