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 126DB9A53 for ; Fri, 2 Dec 2011 15:06:05 +0000 (UTC) Received: (qmail 83260 invoked by uid 500); 2 Dec 2011 15:06:05 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 83166 invoked by uid 500); 2 Dec 2011 15:06:04 -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 83158 invoked by uid 99); 2 Dec 2011 15:06:04 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Dec 2011 15:06:04 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Dec 2011 15:06:01 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D5148AF1F1 for ; Fri, 2 Dec 2011 15:05:39 +0000 (UTC) Date: Fri, 2 Dec 2011 15:05:39 +0000 (UTC) From: "Rick Curtis (Closed) (JIRA)" To: dev@openjpa.apache.org Message-ID: <1921609956.35071.1322838339874.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Closed] (OPENJPA-1329) Looking for best practice for use DataCache API MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/OPENJPA-1329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rick Curtis closed OPENJPA-1329. -------------------------------- Resolution: Not A Problem Assignee: Rick Curtis > But I don't know when the cache should be accessed to improve the performance? Is there any best practice for it ? >From the user manual: Most caches are of limited size. Pinning an identity to the cache ensures that the cache will not kick the data for the corresponding instance out of the cache, unless you manually evict it. Note that even after manual eviction, the data will get pinned again the next time it is fetched from the store. You can only remove a pin and make the data once again available for normal cache overflow eviction through the unpin methods. Use pinning when you want a guarantee that a certain object will always be available from cache, rather than requiring a datastore trip. Please reopen this JIRA if you have any additional questions. Thanks, Rick > Looking for best practice for use DataCache API > ----------------------------------------------- > > Key: OPENJPA-1329 > URL: https://issues.apache.org/jira/browse/OPENJPA-1329 > Project: OpenJPA > Issue Type: Question > Components: datacache > Affects Versions: 1.2.1 > Environment: windows/linux > Reporter: Leilei Zhou > Assignee: Rick Curtis > > I'm looking into OpenJPA's datacache. Config the cache enabled/disabled, cache size is not a problem and they do improve the performance. But from the guides, I can use OpenJPA's StoreCache/QueryCache extension to access(evict,pin...) the cache. > But I don't know when the cache should be accessed to improve the performance? Is there any best practice for it ? -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira