Support » Plugin: LifterLMS » Cookies through PHP sessions cookies have no-cache parameters

  • Resolved Mariano77



    Im having some problem with my site load speed and lifterlms. I also understand this might be a problem from my hosting provider (DreamPress). But as result my site load really slow and varnish is missing.

    This is what Hosting Team say to me, and I wondering if there is any possible workaround about this issue:

    I’m seeing that there are plugins conflicting with the Nginx cache, one of which is lifterlms. When a plugin is configured to set up session cookies through PHP sessions, sometimes those cookies have no-cache parameters that affect the entire site. As a result, a caching service like Nginx wouldn’t be able to cache the site, unfortunately.

    The plugin is showing as setting PHP sessions and session cookies through the files:



    You can contact their support team and ask if there are rules they can provide for the DreamPress team to add to the caching services.

    Using I see the following message:

    301: Moved Permanently
    server: openresty
    date: Tue, 06 Nov 2018 22:52:03 GMT
    content-type: text/html; charset=UTF-8
    transfer-encoding: chunked
    connection: close
    set-cookie: _wp_session=3d6a0e7cc88b97974c043040260cda79%7C%7C1541587923%7C%7C1601160723; expires=Wed, 07-Nov-2018 10:52:03 GMT; Max-Age=43200; path=/,_wp_session=848635e3dbb96fa4499a65f7b70e870b%7C%7C1541587923%7C%7C1601160723; expires=Wed, 07-Nov-2018 10:52:03 GMT; Max-Age=43200; path=/
    x-varnish: MISS
    age: Tue, 06 Nov 2018 22:52:02 GMT

    • This topic was modified 1 year, 2 months ago by Mariano77.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Thomas Patrick Levy



    I’m sorry that our session mechanisms are preventing your caching from working as expected. Unfortunately, LifterLMS runs into a lot of issues when cached data is served to logged in users. Since so much of LifterLMS relies on the ability to serve content to the user based on data in the database. EG: student’s shouldn’t be served cached pages intended for logged out visitors. Instead, they should be served dynamic pages based on their progress in the course / enrollments / etc…

    We are working on refactoring this particular session library out of LifterLMS but we’re probably about 6 months out from having that project completed.

    You could disable session caching all together with a small bit of code. This may help but it can cause some other issues depending on how aggressive your caching is. Maybe you could give it a shot:

    Let me know if that helps



    Thank you so much Thomas, as usual you provide amazing support to this plugin!

    Have a nice day

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Cookies through PHP sessions cookies have no-cache parameters’ is closed to new replies.