Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 476AD200BC1 for ; Wed, 16 Nov 2016 23:41:18 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 432F3160B08; Wed, 16 Nov 2016 22:41:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 918F9160B02 for ; Wed, 16 Nov 2016 23:41:17 +0100 (CET) Received: (qmail 76982 invoked by uid 500); 16 Nov 2016 22:41:16 -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 76970 invoked by uid 99); 16 Nov 2016 22:41:16 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Nov 2016 22:41:16 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 07BFDC09E4 for ; Wed, 16 Nov 2016 22:41:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.379 X-Spam-Level: ** X-Spam-Status: No, score=2.379 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id v5oz1AUZjOua for ; Wed, 16 Nov 2016 22:41:14 +0000 (UTC) Received: from mail-vk0-f46.google.com (mail-vk0-f46.google.com [209.85.213.46]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 3346F5F5A4 for ; Wed, 16 Nov 2016 22:41:14 +0000 (UTC) Received: by mail-vk0-f46.google.com with SMTP id x186so127483578vkd.1 for ; Wed, 16 Nov 2016 14:41:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=WyXA7MzCuPdH+Le7DJCjg+Mn9XnfHzkmN/2ukvWh+IY=; b=yxxuJZ1zjTsDdK7S48qd0Esgq1kbFCpbdhjGe0Y0dxGObX5qipd3151TbqKBbTD3PM nZhTpSezu36mgkoNLF90SgzovMKALZDP8F7/j1C7pGmQF7Nuw3VCHEUiGLMgIl21JZqx kZl9P96lmfqTEe18WjGBl9OmW/ubn3OuEi/eg1ZphG0SnjmDiKj+FZ7W1clni4XW7spt 6wkO9bt93ce7yOjpdhL/2G98uNjTKqD07EuwascjImOdlKtYFekYW6z39cTdXRC3jlp9 w1xm8UyLP/6NZF3S0Hhv96QmGDzCWyv+t7WChRt4LTPuq2ZefSapU16g3Hi3t5vuNpEx 40zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=WyXA7MzCuPdH+Le7DJCjg+Mn9XnfHzkmN/2ukvWh+IY=; b=UPatDrIlmM/2mIEjZ/K1+A0w+I6+I4LuZG8FULkkNXAyeATvFStD6W+Fef7g1DbmH1 cceBfpHuo7rubRBWkf1Zt0YXFrYzQd5TFZH0Fm4tLeVu8DSVdqppZS84HdLVMG2zqupa drVHGNwTeyEhl+c43LlGBFmVvaN9Kx+AWDFN1/kjxm5b+0AP+I4rqWYfX8j45EfsBQW5 m5WQDPHpykqf5Z84EKZFhd4GfA7+Hwf2Q9kcepB7C+MinZJ7E9AwwAN8+LGjwSFtKz0l O7kWlEWpQ0YSkHVDRmLBny2mBgLw+q+LIMkVN5Ws4YwNaab6TMULCDwuR4GWyEhNxr0l noZA== X-Gm-Message-State: ABUngvcCNZVKfyimyadxjjFqUUD4nIkHdWTZMSFwu4ioUuRJQ/dkQo0I+A2kOEPYJNlmfxJMklyV0MF+hNWG2A== X-Received: by 10.31.96.202 with SMTP id u193mr3157588vkb.53.1479336073099; Wed, 16 Nov 2016 14:41:13 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.126.7 with HTTP; Wed, 16 Nov 2016 14:41:12 -0800 (PST) From: Lon Varscsak Date: Wed, 16 Nov 2016 15:41:12 -0700 Message-ID: Subject: Shared Cache and relationships To: Apache Cayenne Content-Type: multipart/alternative; boundary=001a114e52f023ffc5054172c52d archived-at: Wed, 16 Nov 2016 22:41:18 -0000 --001a114e52f023ffc5054172c52d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable So previously this year, I posted about about how while fetching an object that it=E2=80=99s relationships weren=E2=80=99t automatically refreshing, e= ven though I was not caching (myself) any data. This is where I learned about =E2=80=9Cshar= ed caches=E2=80=9D and realized that if I turned it off, I kind of get the beh= avior I want (except now peer synchronization doesn=E2=80=99t work). Data within a= single context is cached (if I choose), but once the context is gone, the snapshots are gone. It doesn=E2=80=99t seem to make sense that a global ca= che would hold onto snapshots beyond the life of the objects across contexts=E2=80=A6but that=E2=80=99s what it appears to do. The response was, =E2=80=9Crefresh your relationships with prefetches=E2=80= =9D. This doesn=E2=80=99t seem like a clean solution to me. It forces the developer = to =E2=80=9Cbe aware=E2=80=9D of stale data and force fetches on relationships that they m= ight not need in that moment. Realize that a lot of components in my application might shared data (like a Customer, or an Order), but the components don=E2= =80=99t necessarily access all of the information in those relationships. I believe EOF, the snapshot would decrement to 0 (when that snapshot wasn=E2= =80=99t referred to anymore by any context) and the next fetch would be fresh. Is there no concept like this for Cayenne? Any help would be appreciated. It=E2=80=99s very possible I=E2=80=99m just= missing the obvious approach. -Lon --001a114e52f023ffc5054172c52d--