> On Nov 8, 2022, at 7:50 AM, Romain Manni-Bucau <rmannibu...@gmail.com> wrote: > > Hi Jon, > > It is intended to not cache the missed hits since they shouldn't occur at > runtime and would open the door to OOME issues. > I looked at your sample, there is indeed a bug in ActionServlet#process > which should do that resolution in init(). > > From my XP frameworks using that kind of resolution cache it themselves > (JSF for ex) if relevant or don't cache it cause it is not a big perf issue > (could be for jbatch) else it looks like bugs.
My experience is a bit different. Systems like DNS will cache both hits and misses. There's an entire RFC dedicated to caching misses specifically: https://www.rfc-editor.org/rfc/rfc2308 Yes, it can result in OOME issues, but some users may prefer that issue to the performance issue. A reasonable way to implement this could be to count the misses we've cached and if the number exceeds a certain threshold we could do any of the following: - stop caching misses - log warnings - purge old cache misses There could be a flag to control the desired behavior with the default to be the current strategy no caching of misses. -David
smime.p7s
Description: S/MIME cryptographic signature