This time a simple question - does peek update statistics for cache misses / hits or do only get & getAll do this? #90
javafanboy
started this conversation in
General
Replies: 2 comments 3 replies
-
To be clear I think it is unfortunate if peek does not update these counters for the front cache as it, in my view, is a fully valid alternative to using get. If using peek a miss (returning null) should of course not update any statistics on the back cache though... |
Beta Was this translation helpful? Give feedback.
3 replies
-
Thanks for the info and good suggestion with the subclassing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am deep diving into some performance results we are seeing. In some situations we do "peek" towards our front cache (in a near cache setup) to determine how to proceed in our execution (favoring in some cases to do bulk requests of items not in the front cache over retrieving them one by one) .
I would naively have assumed that only get & getAll requests update the hit/miss statistics but one of my coworkers asked me if peek could also play in here (i.e. when peek return null is this recorded as a miss and when it returns a value as a hit?) so to be 100% sure how to interpret the results we see I wanted to confirm this....
I suppose it would be good to make this clear in the documentation of the peek method also it, at least to us, was not obvious....
Beta Was this translation helpful? Give feedback.
All reactions