From dev-return-19671-apmail-openjpa-dev-archive=openjpa.apache.org@openjpa.apache.org Thu Nov 10 01:00:40 2011 Return-Path: X-Original-To: apmail-openjpa-dev-archive@www.apache.org Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 667117119 for ; Thu, 10 Nov 2011 01:00:40 +0000 (UTC) Received: (qmail 13141 invoked by uid 500); 10 Nov 2011 01:00:40 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 13116 invoked by uid 500); 10 Nov 2011 01:00:40 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 13108 invoked by uid 99); 10 Nov 2011 01:00:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2011 01:00:40 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=SPF_NEUTRAL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [216.139.236.26] (HELO sam.nabble.com) (216.139.236.26) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2011 01:00:34 +0000 Received: from jim.nabble.com ([192.168.236.80]) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1ROJ02-0003BC-0x for dev@openjpa.apache.org; Wed, 09 Nov 2011 17:00:14 -0800 Date: Wed, 9 Nov 2011 17:00:14 -0800 (PST) From: Ravi P Palacherla To: dev@openjpa.apache.org Message-ID: <1320886814011-6980197.post@n2.nabble.com> Subject: L1 and L2cache. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I have a question about L1 cache refresh. Lets say I have two Entity Managers in my application. I have a simple JPAEntity entity that has id and name values. Sequence of steps in the app: -------------------------------- EntityManager EM1 does a query for JPAEntity with id=1. EntityManager EM2 does a query for same JPAEntity with id=1. EM1 updates name from "old" to "new" Now when EM2 does the query again with id=1, it is showing the value of name as "old" but not "new" I disabled DataCache and QueryCache which means that EM2's query goes to database but it still is showing old values. Reason I think is because EM2's cache (L1cache) is not updated with "new" value. Is my understanding correct ? If yes, then is there a way I can refresh EM2's cache other than using evict() or refresh() call ? Regards, Ravi. -- View this message in context: http://openjpa.208410.n2.nabble.com/L1-and-L2cache-tp6980197p6980197.html Sent from the OpenJPA Developers mailing list archive at Nabble.com.