I have installed varnish cache in my server
Caching and its TTL working good
But the system create new cache object and age for every visitor
How can I config the system to create one cache object for all visitors ?
Thanks a lot
I have installed varnish cache in my server
Caching and its TTL working good
But the system create new cache object and age for every visitor
How can I config the system to create one cache object for all visitors ?
Thanks a lot
I found the answer in this page
https://www.varnish-cache.org/faq
Why does Varnish keep a separate version in cache for each browser?
The backend issues a "Vary: User-Agent" which explicitly tells Varnish too keep a separate version of the page for each User-Agent. Reconfigure your backend server or overwrite the header in vcl_fetch.
Without telling us more what every visitor means, it is quite good that Varnish creates new objects for every one of them.
Otherwise if I log in to your system, it might greet me with "Welcome Egyptian", if I happen to log in after you, because it is reusing a cached object, that has been created by your login.
How does your visitors URL look like? If it contains username, then it is natural that varnish creates new objects for them.