There is no doubt about it. RFC7234 Section 5.2.1.1 includes an example max-age=5 , which, of course, is greater than zero. The definition is also clear (my attention):
The Maximum Age Directive indicates that the client does not want to accept a response whose age exceeds the specified number of seconds .
The “indicated number of seconds” may be any non-negative integer (defined in Section 1.2.1 ). So the answer is a definite yes.
In addition, the above definition also explains the behavior of the cache in your scenario. But before I get to this, I have to fix the following:
The server tells the user agent that the requested resource should be checked after 2 minutes.
Wrong.
The max-age=120 directive means that the server tells all caches, not the user agent, that the response should be considered outdated after 2 minutes. From Section 5.2.2.8 (emphasis added):
The response directive "max-age" indicates that the answer is considered obsolete after its age exceeds the specified number of seconds.
As you can see, recertification requirements are not required. If requests for the same resource are not up to 10 minutes later, re-certification will not continue until 10 minutes.
In addition, from Section 5.2 (emphasis added):
The "Cache-Control" header field is used to specify cache directives along the request / response chain.
It just caches, not the user agent.
Each participant in the request / response chain receives the same response with the same Cache-Control header, but the intended recipients of the Cache-Control header are simply cached. Remember, just because you received it does not mean that it is for you.
For the rest of your scenario, your assessment is correct. I will bring it here:
After 1 minute and a few seconds, the user agent performs another request, specifying max-age 1 minute:
...
From what I understand, this request should bypass the user's cache. Why?
Because at the time of the request, the age of the stored response is more than 60 seconds. It should be obvious that if the age of the saved response is, say, 65 seconds, it cannot be used to satisfy the request using the max-age=60 directive. Thus, the cache simply obeys the directive it receives.
In fact, any standards-compliant HTTP cache, whether integrated into a browser or a separate one, must obey the directive it receives, as described in Section 5.2 (top notch from the source, not mine):
The cache MUST comply with the requirements of the Cache-Control directives defined in this section.
Based on what you described, the custom caching mechanism that you have at work seems to be up to standard. So, my additions to the developers, especially if by "custom" you mean "developed in the house."