Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 68863 invoked from network); 16 Apr 2005 21:34:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Apr 2005 21:34:53 -0000 Received: (qmail 78483 invoked by uid 500); 16 Apr 2005 21:34:53 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 78468 invoked by uid 99); 16 Apr 2005 21:34:52 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of edgarpoce@gmail.com designates 64.233.170.206 as permitted sender) Received: from rproxy.gmail.com (HELO rproxy.gmail.com) (64.233.170.206) by apache.org (qpsmtpd/0.28) with ESMTP; Sat, 16 Apr 2005 14:34:51 -0700 Received: by rproxy.gmail.com with SMTP id y7so949255rne for ; Sat, 16 Apr 2005 14:34:49 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=lnJTVO7mp4iZoLnuDga0YOjK8mnpoHTQQVo0QOmpN+uj3db5vOEK1A9RFWoAHfn4EKosLo5o7nBAuCfvOwwpzHGZXQSEmouLvC5iw8GhUXR/SWlHPH7wBS3L2Sn6aO9ecbiPOWuZ94jAPUQeD9wH+vLFxd84kgy5J5nJKQIWNP4= Received: by 10.38.1.71 with SMTP id 71mr967571rna; Sat, 16 Apr 2005 14:34:48 -0700 (PDT) Received: from ?192.168.0.187? ([24.232.12.20]) by mx.gmail.com with ESMTP id z1sm1383278rne.2005.04.16.14.34.48; Sat, 16 Apr 2005 14:34:48 -0700 (PDT) Message-ID: <42618509.4030200@gmail.com> Date: Sat, 16 Apr 2005 18:35:05 -0300 From: Edgar Poce User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: jackrabbit-dev@incubator.apache.org Subject: Re: Getting "custom" objects from the repository? References: <181174235.20050416061620@freemail.hu> <426119F3.4060809@jboss.com> <826865421.20050416205632@freemail.hu> In-Reply-To: <826865421.20050416205632@freemail.hu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi daniel Daniel Dekany wrote: > I would be happily build a such framework, but I don't see how... JCR > nodes doesn't even have some kind of automatically maintained > last-modified property that I could use for quickly checking if the > object in the cache is outdated or not. It is almost everything that is > needed for the happiness. Seems to me such a low hanging fruit... > > Node n = (Node) session.getItem("/foo/theTemplate"); > cacheEntry = cache.get("/foo/theTemplate"); > if (!n.getStamp().equals(cacheEntry.getStamp())) { > The cached object is outdated, so let's recreate using the > current value of the insertsomethinghere property. > } else { > return cacheEntry.getObject() > } > I guess you can do it by creating a custom node type with a mandatory property that stores the last update timestamp. WDYT? the first line of your example would be something like: Property p = (Property) session.getItem("/foo/theTemplate/mapping:lastUpdate"); But since graffito, lenya and jackrabbit communities are interested in such a tool it would be cool to work together, that would be the apache way, right? :). AFAIK the proposal discussed in the graffito dev list deals with many of the issues you are talking but I didn't see any reference to a cache with already mapped objects. regards edgar