• s2Member is telling my caching plugin not to cache certain pages. While this makes sense for most caching plugins, I use WP Rocket. WP Rocket creates unique cache for each users. There is no need for DONOTCACHEPAGE to be set on every page when a user is logged in.

    Is there a way to turn this off? I want to allows caching for logged in users.

    https://wordpress.org/plugins/s2member/

Viewing 15 replies - 1 through 15 (of 15 total)
  • Not unless you hack s2Member. If you want caching for logged-in members with s2Member, you need ZenCache Pro (by the same developers).

    Thread Starter Nickf4n

    (@nickf4n)

    Well, what hack would I need exactly?

    I do not want to use ZenCache. WPRocket suits my needs better. Do you speak for the devs?

    I paid for s2member pro, I doubt that they would now hold me to ransom saying “you must pay us for ZenCache if you want caching!”

    So, I am guessing that I can disable the DONOTCACHEPAGE constant via a MU plugin or something?

    I’ve no idea what hack. I am just telling you the position.

    There’s nothing to stop you making a feature request. But if you indulge in hyperbole about being held to ransom, it might fall on deaf ears.

    Thread Starter Nickf4n

    (@nickf4n)

    My response more directed at you. I asked a question and you gave me an unhelpful response that sounded like a sales pitch. I was asking if you actually spoke for the devs?

    I am guessing you don’t though.

    No, I don’t. No sales pitch at all: I was just telling you the position. Short and accurate.

    Thread Starter Nickf4n

    (@nickf4n)

    Great, in this case, an answer that does not involve me buying an entirely different caching plugin would be awesome?

    If I knew of such an answer, I would certainly say so.

    On the other hand, I’ve just taken a look at WP Rocket’s pricing and, in comparison to ZenCache Pro, it’s three times the price or more.

    Plugin Author JasWSInc

    (@jaswsinc)

    > Is there a way to turn this off? I want to allows caching for logged in users.

    Create the following directory and file:
    /wp-content/mu-plugins/s2-no-cache.php

    <?php
    add_action('ws_plugin__s2member_before_no_cache_constants', function($vars){
      $vars['__refs']['once'] = true;
    });

    I do NOT recommend this however. Caching is disabled for some very good reasons, so please use at your own risk. i.e., a membership site is very dynamic by nature, so caching is disabled intelligently by s2Member, and only when necessary.

    Thread Starter Nickf4n

    (@nickf4n)

    Thanks for the response.

    I do NOT recommend this however. Caching is disabled for some very good reasons, so please use at your own risk. i.e., a membership site is very dynamic by nature, so caching is disabled intelligently by s2Member, and only when necessary.

    It is blocking caching for logged in users on every single page of my site. Even pages with no protected content at all…

    Can I set the code above to not fire off on certain pages with is_page()?

    Thread Starter Nickf4n

    (@nickf4n)

    On the other hand, I’ve just taken a look at WP Rocket’s pricing and, in comparison to ZenCache Pro, it’s three times the price or more.

    And? The price of the product does not make it a bad product. I use WP Rocket for very specific reasons. ZenCache is not capable of doing what WP Rocket does for me.

    Also, I already own WP Rocket. If I bought ZenCache I would be spending more money…

    … I really do not understand why you are being so pushy with ZenCache. I never asked for alternative caching plugins. I tested ZenCache and it simply is not for me.

    Plugin Author JasWSInc

    (@jaswsinc)

    Sure. I haven’t tested that myself, but I don’t see any problem with doing so.

    <?php
    add_action('ws_plugin__s2member_before_no_cache_constants', function($vars){
        if (is_page(array(1, 2, 3))) {
            $vars['__refs']['once'] = true;
        }
    });
    Thread Starter Nickf4n

    (@nickf4n)

    Sure. I haven’t tested that myself, but I don’t see any problem with doing so.

    Fantastic! Thanks so much for the quick response, this has save me a lot of headaches.

    “And? The price of the product does not make it a bad product.”

    Who said that it did?

    Although you already own WP Rocket, you’ll need to renew it every year. At the point of renewal, you’d save money by switching. That’s it: quite simple really.

    Thread Starter Nickf4n

    (@nickf4n)

    “And? The price of the product does not make it a bad product.”

    Who said that it did?

    Although you already own WP Rocket, you’ll need to renew it every year. At the point of renewal, you’d save money by switching. That’s it: quite simple really.

    Great, you have convinced me to buy something that does not meet my needs. Even though ZenCache is absolutely useless to me. Even though with my specific configuration WP Rocket is twice as fast as Zen cache…

    … Your persistence has has swayed me!

    I shall purchase a product that is of no value to me and use it to replace a product that does everything I need. Thanks!

    Ha, ha! Good one!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Allowing caching for logged in users’ is closed to new replies.