Thanks Pavel. I will look into those. Regards Sudhir
On Wednesday, November 13, 2019, Pavel Tupitsyn <[email protected]> wrote: > Sure, you can query multiple items as well in various ways - see > ICache.Query method [1] > ICache is also IEnumerable, so you can iterate over entire contents, and > even call ToList/ToArray on it for smaller caches. > > [1] https://apacheignite-net.readme.io/docs/cache-queries > > On Tue, Nov 12, 2019 at 7:20 PM Sudhir Patil <[email protected]> > wrote: > >> Thanks Pavel. >> I want both - both whole list and individual items within that list to >> be queried from cache. Hence was asking on that side. >> >> Regards, >> Sudhir >> >> On Monday, November 11, 2019, Pavel Tupitsyn <[email protected]> >> wrote: >> >>> As I understood, you store the whole list of 10000 employees as a single >>> object: >>> cache[key] = GetAllEmployees(); >>> >>> Instead, try storing every employee object separately: >>> foreach (var employee in GetAllEmployees()) >>> cache.Put(employee.Id, employee) >>> >>> This way you can retrieve individual employees quickly with >>> cache.Get(1500) >>> >>> P.S: the foreach loop above explains the concept, but more efficient >>> version is: >>> cache.PutAll(GetAllEmployees().Select(e => new KeyValuePair<long, >>> Employee>(e.Id, e)) >>> >>> On Mon, Nov 11, 2019 at 7:44 PM Sudhir Patil <[email protected]> >>> wrote: >>> >>>> Hi Pavel, >>>> >>>> Scenario is - i am caching list of let's say 10000 employee poco class >>>> objects with name 'employeeCache'. >>>> Now, from this cache, I want to get employee object with id 1500. >>>> 1) For this what is fastest & efficient way ? >>>> Simple one is get full cache data i.e. 'employeeCache' object and then >>>> find employee with id 1500 using link etc. >>>> Or there is another efficient way ? >>>> >>>> 2) for 1st request / any subsequent Get request of this cache, does it >>>> connect with server node? >>>> >>>> Regards, >>>> Sudhir >>>> >>>> On Friday, November 8, 2019, Pavel Tupitsyn <[email protected]> >>>> wrote: >>>> >>>>> Hi, >>>>> >>>>> Every request is communicated to the server, there is no "local cache" >>>>> or anything like that. >>>>> >>>>> On Fri, Nov 8, 2019 at 8:37 PM Sudhir Patil <[email protected]> >>>>> wrote: >>>>> >>>>>> Hi All, >>>>>> >>>>>> In ignite.net server node stores cache data and a thin client >>>>>> communicates with server to get cache data. >>>>>> >>>>>> In such situations, post 1 request of cache data by thin client, does >>>>>> all further requests still communicate with server or it stores that >>>>>> cache >>>>>> data on thin client and server from there and do not communicate with >>>>>> server ?? >>>>>> >>>>>> Regards, >>>>>> Sudhir >>>>>> >>>>>> >>>>>> -- >>>>>> Thanks & Regards, >>>>>> Sudhir Patil, >>>>>> +91 9881095647. >>>>>> >>>>> >>>> >>>> -- >>>> Thanks & Regards, >>>> Sudhir Patil, >>>> +91 9881095647. >>>> >>> >> >> -- >> Thanks & Regards, >> Sudhir Patil, >> +91 9881095647. >> > -- Thanks & Regards, Sudhir Patil, +91 9881095647.
