You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unrestricted Health check should be able to be cached #2630
It would be nice to still be able to have the caching functionality even if the health endpoint is unrestricted. For example, if I have an intensive health check which is unrestricted, but running on a local IP or otherwise protected, I may still want to have the value be cached so that an overly zealous health check doesn't cause the service to degrade.
@philwebb I'd welcome your thoughts on the fix. Specifically, I'm wondering if we might also want a property to force caching for secure access. If we do, or we think we might in the future, then a single, more generally named property could be preferable to one that controls caching for unrestricted access and one that controls caching for secure access. endpoints.health.always-cache, perhaps?
@wilkinsona We could consider just always caching results. The current logic is a little complex and I'm wondering if the time-to-live property alone is enough for most people. The docs already imply that caching occurs regardless of how the endpoint is accessed or if it is secured.
Activity
wilkinsona commentedon Mar 16, 2015
I have a fix for this issue here.
@philwebb I'd welcome your thoughts on the fix. Specifically, I'm wondering if we might also want a property to force caching for secure access. If we do, or we think we might in the future, then a single, more generally named property could be preferable to one that controls caching for unrestricted access and one that controls caching for secure access.
endpoints.health.always-cache, perhaps?philwebb commentedon Mar 17, 2015
@wilkinsona We could consider just always caching results. The current logic is a little complex and I'm wondering if the
time-to-liveproperty alone is enough for most people. The docs already imply that caching occurs regardless of how the endpoint is accessed or if it is secured.wilkinsona commentedon Mar 19, 2015
@philwebb Sold. The current logic made my head hurt a bit when I was working on this fix; simplifying it definitely sounds good to me.
Cache /health response irrespective of sensitivity and security
Ensure that a TTL of zero is honoured by HealthMvcEndpoint
Cache /health response irrespective of sensitivity and security
Ensure that a TTL of zero is honoured by HealthMvcEndpoint