Publisher does not support the Fluid field type. Please do not contact asking when support will be available.

If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.

Ticket: Headers produce no-cache if Publisher Lite is enabled

Status Resolved
Add-on / Version Publisher Lite 1.5.7
Severity Critical
EE Version 2.9.2

Jacek Sompel 1

Nov 25, 2014

Hi,

I’ve noticed that even Generate HTTP Page Headers in EE is set to No and if I enable the Publisher Lite plugin my clients EE site pages come back with headers set to:

HTTP/1.1 200 OK
Server: nginx
Date: Tue, 25 Nov 2014 10:55:15 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Pragma: no-cache
Content-Encoding: gzip
X-Varnish: 329080
Age: 0
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
X-Cache: cached

If I disable the Publisher Lite it no longer returns the Cache-Control in the headers.

HTTP/1.1 200 OK
Server: nginx
Date: Tue, 25 Nov 2014 11:02:52 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 6517
Connection: keep-alive
Content-Encoding: gzip
X-Varnish: 164294 65792
Age: 140
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
X-Cache: cached
Accept-Ranges: bytes

This is a huge issue when you have site setup behind Varnish as not a single page on the site will ever get cached. I’ve searched through the entire EE site code and the only place I can find the no-cache references are within EE core. What I don’t understand why would enabling this extension cause EE to output headers even though it is set not to generate them

I am at loss as the client needs the ability to control who can publish updates in certain channels but this extension is simply killing site performance because of the headers with no cache flags.

Are you able to assist with this issue?

Thanks,
Jacek

#1

BoldMinded (Brian)

Jacek, I’m not sure what would be causing this. Publisher only attempts a redirect if you’re using languages. Are you positive its Publisher adding the headers? Have you disabled all other add-ons to see if anything else could be doing it?

#2

Brian Litzinger

Jacek, I can see the issue when I uninstall Publisher, but I’m not quite sure yet what in Publisher is doing this. I haven’t intentionally added or modified headers, so I’ll dig into it and see what is causing this. May not have a fix for you though until after the holidays.

#3

BoldMinded (Brian)

Apparently PHPs session sets the Cache-Control to the value you are seeing by default. In ext.publisher.php change line 108 and the following few lines to this:

public function sessions_start()
    {
        if (session_id() === '' && REQ === 'CP')
        {
            session_start();
        }

You’re just adding the && REQ part. Let me know how that works for you.

#4

BoldMinded (Brian)

Marking this as closed because it fixes the issue for me. Will be included in the next release.

Login to reply