I suppose Sky Ao wants to cache null result, too.
BTW. Hibernate has a second level cache. Maybe better opition.
BTW2. Hibernate default 2nd level cache is a poor
HashtableCacheProvider. It would be great to have some well working
GuavaCacheProvider. EHCache is tricky to configure and IMHO overkill
for small projects.
On 6 ún, 23:25, Kevin Bourrillion <
kev...@google.com> wrote:
> Hang on; the first question to ask is whether you expect the null result to
> be *cached* or not. If you do, Louis is right; if you don't, throw an
> exception.
>
> On Mon, Feb 6, 2012 at 1:33 PM, Louis Wasserman
> <
wasserman.lo...@gmail.com>wrote:
>
>
>
>
>
>
>
>
>
> > You could use Optional...
>
> > But it might be more appropriate here to write your own wrapper class that
> > works like Optional but has more appropriate method names.
>
> > Louis Wasserman
> >
wasserman.lo...@gmail.com
> >
http://profiles.google.com/wasserman.louis
> >> To get help:
http://stackoverflow.com/questions/ask(use the tag "guava")
> > To get help:
http://stackoverflow.com/questions/ask(use the tag "guava")