MarketPress Cookie Exceptions for Varnish Cache - Usage Page Clarification Q

Hi WPMUdev,

I hope your day is going well :slight_smile:

I am working on installing MarketPress on my network hosted at SiteGround.com which will be using Varnish Cache and I am seeking some clarification of what I need to request from my host as mentioned in the MP usage page.

Note, fyi: I will activate MP only per site; also am using Domain Mapping for http frontend & original-network https addresses for login/admin.

Specifically, the usage page says:

If using a Varnish cache, please contact your hosting provider and ask them to add the exceptions.

But the only reference made to 'the exceptions' seems to be:

PHPSESSID
mp_globalcart_*

But this is confusing in part because the formatting of the usage page instructions seems unclear... The full paragraph is:

If you are using a caching plugin such as W3 Total Cache or have another caching mechanism such as Varnish enabled on your server you’ll need to add a couple of cookie exceptions for MarketPress to function correctly.PHPSESSID mp_globalcart_*If you are using W3 Total Cache you’ll want to add this to the Reject cookies setting (one item per line).If using a Varnish cache, please contact your hosting provider and ask them to add the exceptions.

Can you please provide me with a 'copy & pastable' list & explanation of the needed exceptions for me to send to my host for review?

Thanks for clarifying this for me :slight_smile:

Kind Regards,
Max

  • Vaughan
    • Support/SLS MockingJay

    Hi Max,

    Hope you're well?

    The 2 you need to ask them to make cookie exceptions for are the following cookies in varnish.

    PHPSESSID
    mp_globalcart_*

    They should understand once you give them this :slight_smile:

    If you need further assistance, then let us know and we'll help as best we can.

    Hope this helps

      • wp.network
        • The Bug Hunter

        Perhaps like this:

        If you are using a caching plugin such as W3 Total Cache or have another caching mechanism such as Varnish enabled on your server you’ll need to add a couple of cookie exceptions for MarketPress to function correctly.
        PHPSESSID
        mp_globalcart_*
        If you are using W3 Total Cache you’ll want to add this to the Reject cookies setting (one item per line).If using a Varnish cache, please contact your hosting provider and ask them to add the exceptions.

  • Ben
    • The Reaper

    Here are some additional things I had to do in regards to your varnish set up:

    if (req.url ~ "\?__domainmap_action") {
    return(pipe);
    }

    Also I would recommend making cookie exceptions as follows:

    if (req.http.Cookie ~ "auth" || req.http.Cookie ~ "noaffiliate_" || req.http.Cookie ~ "__utma" || req.http.Cookie ~ "wordpress_" || req.http.Cookie ~ "mp_session" || req.http.Cookie == "PHPSESSID" || req.http.Cookie ~ "mp_globalcart_") {

    Hope that helps...and please WPMU team keep updated documentation on cookies in the help file on each release...no more slacking :slight_smile:

    Everybody should be using a caching system on their server so this is important.

    Thanks guys.

  • Vaughan
    • Support/SLS MockingJay

    Hi,

    Ben's advice is good, if you pass that along to siteground, they should be able to sort that for you.

    Cheers @Ben for that extra info.

    I have flagged our docs team to this thread too, so hopefully they can update the usage guide when they get a chance.

    Cheers

    • wp.network
      • The Bug Hunter

      Thanks @Ben and @Vaughan

      I have forwarded details to my host, they have escalated ticket... we will see :slight_smile:

      I have flagged our docs team to this thread too, so hopefully they can update the usage guide when they get a chance.

      Awesome! Better documentation is almost always a great outcome!

      Cheers, Max

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.