I'm trying to tune my varnish cache server in order to be able to cache pages with some specific cookies.
However I find it very hard to see if a page is actually cached or not. I know that in varnish I cannot list all the cached URLs, but is it possible to show in real time if pages coming from the backend are being cached or not?
And even more - if they are not cached probably there's a way to find out why?
Because honestly it's very hard to believe that such a complex solution works in the way that you just configure some stuff and then you "hope" it will cache pages, but you have no real way to check if they are being cached or not and (most important) why the decision not to cache the page was taken? And then if page is not cached then you have no idea why and and the only way to find out is by guessing and changing random stuff in the configuration and checking if it will somehow change the cache behavior?
I guess I can monitor the backend requests and if there's no more request to certain URL despite it being opened then the page is cached, but this is really guessing and not actual way to be sure about the status and condition of the page in varnish cache.