On 9 Aug 2013, at 18:14, Dennis Reed <dereed(a)redhat.com> wrote:
On 08/09/2013 07:55 AM, Mircea Markus wrote:
> The only argument I found was that's the way the spec does it :-) I
> think CacheLoader + CacheWriter is a nice OOP design, but is rather
> theoretical. In all external users scenarios I know, the interaction
> with the store is read+write so most of the people thing about a store
> along this lines. Having a distinction between loads and stores seems
> unnatural and creates confusion. For the few that only need a loader
> they can simply leave the store() empty - as simple as that.
I have seen some users with read-only CacheLoaders, so it's not just
theoretical.
Thanks Dennis, definitely a good argument for splitting them then!
But I do agree that just not implementing the store methods shouldn't be
a big issue for this use case.
Cheers,
--
Mircea Markus
Infinispan lead (
www.infinispan.org)