FYI, I am using Ignite 2.16. I have also been playing with the Ignite metrics. This allows me to see the numbers of Get()'s for each cache, but I have a suspicion I can't enable it for existing caches.Is that correct? At least, when I enable it on an existing system I just get zeros back, but a new system appears to track the statistics as expected.
Thanks, Raymond. On Fri, Feb 21, 2025 at 12:44 PM Raymond Wilson <raymond_wil...@trimble.com> wrote: > Apologies, Change > > { /* It was read from persistence */ } > > for > > { > /* It needs to be read from persistence */ > result = _cache.Get(key); > } > > On Fri, Feb 21, 2025 at 12:39 PM Raymond Wilson < > raymond_wil...@trimble.com> wrote: > >> I am experimenting with some metrics to help us understand how often >> Cache.Get() operations are satisfied by returning a value already >> existing in memory, versus those that are satisfied by needing to read that >> content from the persistent store. >> >> The way I am attempting to do this is by using TryLocalPeek(), eg: >> >> if (_cache.TryLocalPeek(key, out var result, CachePeekMode.Onheap, >> CachePeekMode.Offheap)) >> { /* It was already in memory */ } >> else >> { /* It was read from persistence */ } >> >> Oddly, it appears almost all calls are satisfied by the TryLocalPeek() >> call, even on a completely cold restarted system. >> >> Can anyone confirm if my expected behaviour here is correct (and there is >> a bug), or if I am 'doing it wrong' and there is a better way? >> >> Thanks, >> Raymond. >> >> >> -- >> <http://www.trimble.com/> >> Raymond Wilson >> Trimble Distinguished Engineer, Civil Construction Software (CCS) >> 11 Birmingham Drive | Christchurch, New Zealand >> raymond_wil...@trimble.com >> >> >> <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch> >> > > > -- > <http://www.trimble.com/> > Raymond Wilson > Trimble Distinguished Engineer, Civil Construction Software (CCS) > 11 Birmingham Drive | Christchurch, New Zealand > raymond_wil...@trimble.com > > > <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch> > -- <http://www.trimble.com/> Raymond Wilson Trimble Distinguished Engineer, Civil Construction Software (CCS) 11 Birmingham Drive | Christchurch, New Zealand raymond_wil...@trimble.com <https://worksos.trimble.com/?utm_source=Trimble&utm_medium=emailsign&utm_campaign=Launch>