Viewing 15 replies - 1 through 15 (of 18 total)
  • Plugin Contributor Pippin Williamson

    (@mordauk)

    Hey James,

    Who is your site hosted with?

    Moderator James Huff

    (@macmanx)

    DreamHost on the DreamPress platform.

    Plugin Contributor Pippin Williamson

    (@mordauk)

    Can you go to Downloads > Tools > System Info and paste the contents here for me?

    Moderator James Huff

    (@macmanx)

    Thanks, Pippin, it’s:

    ### Begin System Info ###

    — Site Info

    Site URL: https://sarahwallinhuff.com
    Home URL: https://sarahwallinhuff.com
    Multisite: No

    — Hosting Provider

    Host: DBH: mysql-1.sarahwallinhuff.com, SRV: sarahwallinhuff.com

    — User Browser

    Platform: Apple
    Browser Name: Safari
    Browser Version: 8.0.2
    User Agent String: Mozilla/5.0 (Macintosh; Intel Ma
    c OS X 10_10_1) AppleWebKit/600.
    2.5 (KHTML, like Gecko) Version/
    8.0.2 Safari/600.2.5

    — WordPress Configuration

    Version: 4.1
    Language: en_US
    Permalink Structure: /%year%/%monthnum%/%day%/%postname%/
    Active Theme: Twenty Fourteen Custom 1.0
    Show On Front: posts
    Remote Post: wp_remote_post() works
    Table Prefix: Length: 10 Status: Acceptable
    Admin AJAX: Accessible
    WP_DEBUG: Disabled
    Memory Limit: 40M
    Registered Post Stati: publish, future, draft, pending, private, trash, auto-draft, inherit, refunded, failed, revoked, abandoned, active, inactive, spam

    — EDD Configuration

    Version: 2.2.2
    Upgraded From: 2.1.4
    Test Mode: Disabled
    Ajax: Enabled
    Guest Checkout: Enabled
    Symlinks: Disabled
    Download Method: Direct
    Currency Code: USD
    Currency Position: before
    Decimal Separator: .
    Thousands Separator: ,

    — EDD Page Configuration

    Checkout: Valid
    Checkout Page: https://sarahwallinhuff.com/checkout/
    Success Page: https://sarahwallinhuff.com/checkout/purchase-confirmation/
    Failure Page: https://sarahwallinhuff.com/checkout/transaction-failed/
    Downloads Slug: /downloads

    — EDD Gateway Configuration

    Enabled Gateways: PayPal Standard
    Default Gateway: PayPal Standard

    — EDD Tax Configuration

    Taxes: Disabled
    Tax Rate: 0
    Display On Checkout: Not Displayed
    Prices Include Tax: No

    — Must-Use Plugins

    — WordPress Active Plugins

    Akismet: 3.0.4
    Clef: 2.2.9.1
    Easy Digital Downloads: 2.2.2
    EDD – Prevent Checkout for the EU: 1.0.7
    Jetpack by WordPress.com: 3.3
    PuSHPress: 0.1.7.2
    The Events Calendar: 3.9
    Varnish HTTP Purge: 3.5.1
    VaultPress: 1.7.0
    WordPress SEO: 1.7.1

    — WordPress Inactive Plugins

    — Webserver Configuration

    PHP Version: 5.6.0
    MySQL Version: 5.1.39
    Webserver Info: Apache

    — PHP Configuration

    Safe Mode: Disabled
    Memory Limit: 256M
    Upload Max Size: 100M
    Post Max Size: 100M
    Upload Max Filesize: 100M
    Time Limit: 500
    Max Input Vars: 1000
    Display Errors: On (1)

    — PHP Extensions

    cURL: Supported
    fsockopen: Supported
    SOAP Client: Installed
    Suhosin: Not Installed

    — Session Configuration

    EDD Use Sessions: Disabled
    Session: Disabled

    ### End System Info ###

    (Note, despite what is quoted above, Settings -> General has both site and home as HTTP, not HTTPS.)

    Plugin Contributor Pippin Williamson

    (@mordauk)

    Looks like you have disabled PHP sessions. Could you add this to your wp-config.php and see if that resolves it?

    define( 'EDD_USE_PHP_SESSIONS', true );

    Moderator James Huff

    (@macmanx)

    Added the line, updated to 2.2.3, and flushed Varnish.

    Instead of getting a cookie titled edd_wp_session on every page, now I’m getting a cookied titled PHPSESSID on every page, but Varnish is still returning Age: 0, so maybe it’s not EDD.

    Moderator James Huff

    (@macmanx)

    Ok, I tried a few more configurations, it’s definitely still EDD.

    Previously, on the hosting provider’s recommendation, I had define( 'EDD_USE_PHP_SESSIONS', false ); in wp-config.php and that was causing the edd_wp_session cookie to fire on every page.

    After placing define( 'EDD_USE_PHP_SESSIONS', true ); instead on your suggestion, the PHPSESSID cookie fired on every page instead.

    If I deactivate EDD, no session cookies are fired.

    Unfortunately, both style of session cookies will kill the Varnish cache.

    I don’t mind EDD killing the cache, I know why it has to, I just wish it only fired those cookies on pages with EDD elements (the store page, the cart, checkout, wherever the cart widget is, etc).

    Plugin Contributor Pippin Williamson

    (@mordauk)

    I’m going to ping Mika Ipstenu (she works at Dreamhost and uses EDD) to see if she happens to know anything here.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    PHP Sessions will ALWAYS prevent Varnish from caching. That’s kinda obvious when you think about it, since a PHP session is telling the browser “Hi, I need a special PHP session here, unique to the user.” Setting that to false will work better on most (if not all) caches.

    There are two things here.

    1) https == no Varnish cache. Varnish cannot, will not, cache https. The devs chose not to. Can’t fix that. (Which is why I recommend using HTTPS only where one needs https, and thank GOD EDD lets you do that easily).

    2) The ‘age’ is set to 0 (James, we talked about that I thought…) Check out https://www.isvarnishworking.com/ – It’s dead simple tool to check and you can see this:

    Set-Cookie: edd_items_in_cart=deleted; expires=Thu, 01-Jan-1970 00:00:01 GMT; Max-Age=0; path=/

    So here we have a cookie (which I’ve already told James’ Varnish to ignore) and THEN we have an expires of 1970 and a Max-Age of 0… which both tell Varnish “This page expired, please recache.”

    No kidding it ain’t caching right :/

    I would put dollar down on some rogue JS doing it. I saw this with a plugin from Yikes! that did this too, but last week I didn’t have sit-down time to debug since I was doing training classes :/

    Edited to add: https://cloudup.com/iJOs4C40SGK

    That’s not on DreamPress, as it happens. And yes, it goes away if I disable EDD ??

    Moderator James Huff

    (@macmanx)

    Thanks for double-checking, Mika! Much appreciated. ??

    Plugin Contributor Pippin Williamson

    (@mordauk)

    Does it only happen, per chance, after an item is added to the cart?

    Moderator James Huff

    (@macmanx)

    No, it’s always there, even if you just enter at the domain via an Incognito window.

    Plugin Contributor Pippin Williamson

    (@mordauk)

    Could you set EDD_USE_PHP_SESSION to false for me? I’d like to look at your site with that setting. I have an idea.

    Moderator James Huff

    (@macmanx)

    Done, thanks again!

    Moderator James Huff

    (@macmanx)

    I just noticed that I’m also getting a edd_wp_session cookie in wp-admin too, even if I go to it directly and log in via an Incognito window without visiting the front-facing portion of the site.

    I get the feeling that probably shouldn’t happen, since I can’t buy anything from the Dashboard.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Breaking Cache on Every Page’ is closed to new replies.