When refreshing the page in the browser 2 requests are made. One for the favicon and one with path "/".
Skip the favicon request to have the counter match the amount of refreshes.
Also, because it now skips over the 8th refresh, the message "Cache expired" is never displayed.
Multiple ways to fix this, but this would be the simplest one i guess.
Another option is to create a middleware that can be reused whenever this problem occurs in other examples.
When refreshing the page in the browser 2 requests are made. One for the favicon and one with path "/". Skip the favicon request to have the counter match the amount of refreshes. Also, because it now skips over the 8th refresh, the message "Cache expired" is never displayed.
Multiple ways to fix this, but this would be the simplest one i guess. Another option is to create a middleware that can be reused whenever this problem occurs in other examples.