On Sat, Oct 15, 2011 at 10:48 PM, Raffaele P. Guidi <[email protected]> wrote: > We can consider the current implementation as the shortest path to a working > and efficient off-heap cache, and I really would like to keep things this > simple - no configuration at at all for the default configuration - but the > subject of multiple buckets has been already brought up and give users a > choice will be great. > > Now, I like the current Cache facade as it is (it is straightforward for > simple use cases) but MemoryStorage should be refactored - it is probably > wrong to have it as a singleton (the underlying OffHeapMemoryBuffer, the > basic building block, is not a singleton) - and we could write a > non-singleton implementation for the Cache as well - and here it is the > implementation for multiple caches (buckets?) in the same VM.
> > Then the Cache singleton facade could be rafactored to use the non singleton > one as its foundation. Agree on this, we should have something working and easy to use. It can easily be refined and give a different facade :) > > Ciao, > R > > PS: a long answer to just say: ok, let's move towards this goal :D :) > > On Sat, Oct 15, 2011 at 6:54 PM, Ashish <[email protected]> wrote: > >> Folks, >> >> While creating a DirectMemory sample, I realized that there is no way >> to create multiple caches within same JVM. >> >> This is a fairly common use case, and we might need multiple caches >> with different configurations. >> >> Are there any plans to move implementation towards this goal or we can >> handle this situation with current implementation? >> >> -- >> thanks >> ashish >> >> Blog: http://www.ashishpaliwal.com/blog >> My Photo Galleries: http://www.pbase.com/ashishpaliwal >> > -- thanks ashish Blog: http://www.ashishpaliwal.com/blog My Photo Galleries: http://www.pbase.com/ashishpaliwal
