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 D45AFCC76 for ; Fri, 3 Aug 2012 14:42:47 +0000 (UTC) Received: (qmail 51063 invoked by uid 500); 3 Aug 2012 14:42:47 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 51046 invoked by uid 500); 3 Aug 2012 14:42:47 -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 51036 invoked by uid 99); 3 Aug 2012 14:42:47 -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 14:42:47 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 03 Aug 2012 14:42:39 +0000 Received: (qmail 26663 invoked from network); 3 Aug 2012 14:42:20 -0000 Received: from unknown (HELO ?192.168.1.37?) (194.158.197.10) by vorsha.objectstyle.org with SMTP; 3 Aug 2012 14:42:20 -0000 Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Apple Message framework v1084) Subject: Re: Multiple application using same database, cache issue From: Andrus Adamchik In-Reply-To: Date: Fri, 3 Aug 2012 17:42:17 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: user@cayenne.apache.org X-Mailer: Apple Mail (2.1084) X-Virus-Checked: Checked by ClamAV on apache.org 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 = point with common config and management facilities. As of now = object-level cache is not "managed". So you can't expire things from it, = only refresh explicitly.=20 However there's query cache that can be fully managed, and maybe that's = what 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 configuration, it will either be immediately returned from cache, = or refetched. And a refetch would update the object cache as a side = effect. Personally with query cache I barely ever look back at the = object cache.=20 Andrus On Aug 3, 2012, at 5:12 PM, Atli P=E1ll Hafsteinsson wrote: > Hi >=20 > 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? >=20 > Regards, > Atli P=E1ll Hafsteinsson > atlipall@gmail.com >=20