Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: "Mike Schilling" Newsgroups: comp.lang.java.programmer Subject: Re: multithreaded cache? Date: Sat, 26 May 2012 14:54:55 -0700 Organization: A noiseless patient Spider Lines: 35 Message-ID: References: <4fb224b2$0$6867$e4fe514c@news2.news.xs4all.nl> <4fb2e46c$0$6854$e4fe514c@news2.news.xs4all.nl> <4fb35691$0$6944$e4fe514c@news2.news.xs4all.nl> Injection-Date: Sat, 26 May 2012 21:54:54 +0000 (UTC) Injection-Info: mx04.eternal-september.org; posting-host="MPGXQTXsvPvqVKHgwEYAAw"; logging-data="1646"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18CreLtDWrZO/fGIwhq5QUUS4QgzpLvhM4=" X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Response X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 Cancel-Lock: sha1:yZKaD50M45TTuoAb4Q6DDasBJVE= X-Priority: 3 X-MSMail-Priority: Normal Xref: csiph.com comp.lang.java.programmer:14823 "Silvio Bierman" wrote in message news:4fb35691$0$6944$e4fe514c@news2.news.xs4all.nl... > On 05/16/2012 02:26 AM, Eric Sosman wrote: >> On 5/15/2012 7:19 PM, Silvio Bierman wrote: >>> On 05/16/2012 12:57 AM, Roedy Green wrote: >>>> On Tue, 15 May 2012 11:41:06 +0200, Silvio Bierman >>>> wrote, quoted or indirectly quoted someone who said : >>>> >>>>> The simplest approach is to wrap your cached values in an object and >>>>> make all cache access go through two stages. >>>> >>>> Where did you learn this? >>> >>> Why do you ask? Do you disagree? >>> >>> It is something I came up with the first time I encountered the same >>> situation, probably many years ago. >>> It is obvious you need to decouple key lookups/insertions, which are >>> inherently cache-global, from value insertions/updates, which could be >>> considered key-local. >>> >>> Eric and Daniel responded with more specific solutions that both match >>> my general pattern. >> >> Three independent votes for one pattern: What we have here is a >> >> M A N D A T E !!! >> > > Let's hope this is inspires the Greeks... They've been dating men for millenia.