Comet Cache not caching pages with any s2Member shortcodes

Well, that won’t be easy or convenient.
Thanks for the explanation.

Carole, is it really that important to cache those pages? If they don’t load slowly, why bother?

@raamdev - if Comet Cache maintains a separate cache for each logged in user, then why would it matter at all if there was a conditional on the page? Your explanation still doesn’t make sense unfortunately.

-Michael

Michael, you are confusing page caching (which is what Comet Cache does) with fragment caching (which doesn’t work with s2Member in any event).

Part of the challenge, in this case, is mostly the technical part as this snippet is part of the header which is on all the pages, which means that I would have to edit many pages to have/not have that login available in the header if it is not site-wide.

The only reason I am asking about this Comet Cache plugin is because I was told by my host that my site had no caching plugin, which made it load slower but they were suggesting Total Cache, which I remember reading, didn’t play nice with s2M. If there is any other option, I am all ears.

I am not confusing anything with anything, I am quoting @raamdevs actual words, which state:

That’s not an ambiguous statement, and if it’s true then there is no reason for any given page to not be cached.

-Michael

Changing plugins won’t make any difference (except for T3TC which, as you say, is likely to cause huge problems).

I think what I’d suggest is that you have two different headers, and then use a PHP conditional on your single and page templates to call the right one according to whether the user is logged in or not.

Of course, two different headers is the answer, but my site has over 600 pages, so that can be a challenge to adjust which page will have which header.

Not really. You would simply write some PHP in the page and single templates to check whether someone is logged in or not.

The point, which Michael clearly missed too, is that if you run the condition before the page starts to load, then CC will be able to cache. Your current problem is that the condition runs after the page had started to load, which makes it impossible for CC to cache.

Who says it’s ambiguous? You took words out of context earlier in this thread, and you’ve done it again here.

CC does keep a separate cache for each logged-in user if you set it to do that. But it’s a page caching plugin. That means it caches a page as a whole. It can’t cache word by word or line by line (which fragment caching can do) and so it can’t get to a conditional and then cache the next bit of content according to the condition.

To get it to cache different content for different users, any condition must be followed before the page starts to load.

Tim, you appear to have no idea what you are talking about. If the plugin keeps a separate, full page cache for each user, then that has nothing to do with fragments. If it caches one page for one user, and a different version of that page for a different user (which is what it means to maintain separate caches for each user) then it doesn’t matter, at all, if it’s the entire page that is different, or just one word… it’s still two full versions of a page that are distinct from one another.

@raamdev - when you get a moment if you wouldn’t mind clarifying I would appreciate it, thanks.

-Michael

Michael, how does CC know what the page contains? It needs to know that when the page loads because it is caching HTML, not PHP. (That’s what OpCache is for.)

So a conditional inserted after the beginning of the content comes too late.

Tim, please stop replying. You are muddying the issue and are responding with things that do not make sense. Thank you.

-Michael

You mean that I don’t agree with you, and that you don’t know the difference between page caching and fragment caching.

No, I mean please stop replying. Twice now you have interjected when I directed questions at @raamdev, and you insist on interjecting statement that are not making sense, let alone being of help. I don’t know why yo keep insisting, but again, please, just stop. Thank you.

-Michael

If you want to talk direct to someone and only them, send them a PM.

Or have the decency to respond to others on the thread like Carole. If you start giving as well as taking, we’ll all be better off.

Tim, I don’t know why you’re doing it on a support forum, but please stop trolling. Seriously.

-Michael

That is precisely why I keep responding. This is NOT a support forum. It’s a forum for fellow users to support one another. Apparently, you don’t get it.