I have a Piwik install sitting behind a varnish-caching server. My problem is varnish is by default caching responses to my API calls. Unfortunately, I don’t have direct access to the varnish server, so I need to send the
“Cache-Control: no-cache”
header with my API responses. Is there a setting or a way to modify my piwik install to accomplish this? Thanks!
That’s weird then. I’m using PHPFog for my hosting and they provide a varnish caching server for every application that’s hosted with them. Normally it works pretty well, but I’m seeing my Piwik API requests getting cached for some reason.
[b]"To prevent caching set the “Cache-Control” header to “no-cache”. This is generally required in applications which don’t produce/consume cookies, but have contents that is actually dynamic. Here is the PHP example to set the Cache-Control header.
header(“Cache-Control: no-cache”);"[/b]
But if Piwik is already sending this header, why is Varnish caching my requests? I’ve attached a screenshot of what I’m seeing.