Return-Path: Delivered-To: apmail-jakarta-jcs-users-archive@www.apache.org Received: (qmail 84166 invoked from network); 16 Aug 2009 18:02:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Aug 2009 18:02:05 -0000 Received: (qmail 85238 invoked by uid 500); 16 Aug 2009 18:02:11 -0000 Delivered-To: apmail-jakarta-jcs-users-archive@jakarta.apache.org Received: (qmail 85161 invoked by uid 500); 16 Aug 2009 18:02:11 -0000 Mailing-List: contact jcs-users-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JCS Users List" Delivered-To: mailing list jcs-users@jakarta.apache.org Received: (qmail 85151 invoked by uid 99); 16 Aug 2009 18:02:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Aug 2009 18:02:11 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jeffpk@gmail.com designates 209.85.210.187 as permitted sender) Received: from [209.85.210.187] (HELO mail-yx0-f187.google.com) (209.85.210.187) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 16 Aug 2009 18:02:03 +0000 Received: by yxe17 with SMTP id 17so3553645yxe.11 for ; Sun, 16 Aug 2009 11:01:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=Nslga3I99LKVmX/xvMt/Sdim71uBFjcx+9vdVxL3UQM=; b=hUH7hpf99ikmxhgVR7k5Iku3eAeBIgQSpeNGYmDwPEMi/tfe9af1PzvPRa9wkbqVjr CKk3UZSeQj8Lh+OQXp/NduWU5m1tOx+baYqJo5vv1z1LNM+wvMUgCFVE17pmpG9WEKv/ htU+l4z0FuvqJ+uxbzu13vFpyjo4Lg7FhSPbc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=P598N0Mlxl1yjclbopRa9QxOaTepbhKv45xVrtyH/AKKB4PeP/6kZ1fuURR0KSGVcg YMVoPDZU3j1c32cVHPw9QROHPLuTEmeVc7+2AmO695snHKhwp7IO5vyBlR/CWMph9Blj HC6xPEvUGHdXoZ4Jqdo+m/QMedeomo5Yj2/vY= MIME-Version: 1.0 Received: by 10.100.18.14 with SMTP id 14mr2803312anr.49.1250445702418; Sun, 16 Aug 2009 11:01:42 -0700 (PDT) In-Reply-To: <802870.35819.qm@web38706.mail.mud.yahoo.com> References: <330f74e70908141555p6eff3162necdfd3171f1262a0@mail.gmail.com> <802870.35819.qm@web38706.mail.mud.yahoo.com> Date: Sun, 16 Aug 2009 14:01:42 -0400 Message-ID: <330f74e70908161101s4c38e4ehc3bab0e1f4574a08@mail.gmail.com> Subject: Re: Okay next tqo quick questions... From: Jeffrey Kesselman To: JCS Users List Content-Type: multipart/alternative; boundary=0016e64691d6e74fd904714613be X-Virus-Checked: Checked by ClamAV on apache.org --0016e64691d6e74fd904714613be Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi Aaron. Thanks again for the help. This is the issue. let me spell out my design and maybe you can either correct it or suggest how to accompish it. I have resource-masters that store and server the actual resources and resource-clients that get from the master and use them. The reource-clients cache locally to disk. These cached values should stay until they are outdated by new versions of the same asset as asset download is expensive. Client usage of resources is base on instructiosn sent by the server,. Because I want to scale out massively for the clients, I ama voiding having the clients listen to puts of new resource versions. Instead, when the server instructs the client o use an asset it oncludes a version number. If that version is not the one in teh cache, then the update is fecthed. Im simualtign version numbers using JCS by coding the version number into the key-string. Its worth notign this design ALSO nicely handles the issue of a client beign offlien whern an updated resoruce is pushed into the master. Next time it is instructed to use it, it will go fecth it. The issue is this: Once I have a new version of an asset, I want to clear the old version OUT of the client disk cache. It is garbage and no lonegr needed and, over-time, this garbage coudl be quite significant in size. The question is... how to garbage colelct the cache? If I know when a new version is beignf etched, I can synthetically create the names of odler versions and make sure theya re deleted. This was my first thought and the genesis of my question about checkling to see if something is in the cache before it is fecthed. ANOTHER approach would be to walk through all the current locally stored cache keys and delete any entreis for which there ar mroe recent versions. (Again, i can determine this through the key-name conventions.) Is this dioable? On Sun, Aug 16, 2009 at 10:23 AM, Aaron Smuts wrote: > > > --- On Fri, 8/14/09, Jeffrey Kesselman wrote: > > > From: Jeffrey Kesselman > > Subject: Okay next tqo quick questions... > > To: "JCS Users List" > > Date: Friday, August 14, 2009, 3:55 PM > > (1) Why does CacheAccess.get() > > return an Object and not a Serializable. > > Doesn't any object stored in the cache have to be a > > Serializable? > > > > The original ICacheAccess interface take and returns objects. The idea was > that the cache should be usable with just memory auxiliaries. So we > shouldn't restrict to Serializable. However, nearly every other auxiliary > requires it. . . . > > > (2) If i call get(...) on my remote cache and the object > > isnt there, it will > > attempt to fetch iot from its server yes? is there > > some way for me to know > > this is happening? some kind of .contains(...) call I could > > call first or > > something? > > > > You call get on a local cache. It it is not present locally, the remote > cache client will call get on the remote cache server. If the server > doesn't have it, it will do the same thing. If the server is configured > with a failover, it will call get on the failover. > > You don't have anyway to know before calling get what will happen > underneath. What would the contains method do? I don't understand. > > Aaron > > > -- > > ~~ Microsoft help desk says: reply hazy, ask again later. > > ~~ > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: jcs-users-unsubscribe@jakarta.apache.org > For additional commands, e-mail: jcs-users-help@jakarta.apache.org > > -- ~~ Microsoft help desk says: reply hazy, ask again later. ~~ --0016e64691d6e74fd904714613be--