Support » Plugins » [Plugin: WP Super Cache] Super Cache and mclude…

  • Resolved baptiste


    I’ve been using SuperCache for a while and it works great for me. I have just tolerated static views for my pages and was happy with it.

    However, I really wanted to be able to replace the comment name/email/website fields with ‘You are logged in as….’ for logged in users.

    My understanding was supercache would serve you the static html or html.gz file for a given page if no cookie was found (never logged in, never left a comment), otherwise you got served a page via the wp-cache-2 code (phase1/phase2).

    Now with that understanding, I was hoping I’d be able to have some dynamic content for logged in users while still serving the static supercache files to folks who aren’t logged in or haven’t commented. So I changed my theme to add the comment form via an include inside mclude tags. The thought was the static file would get created from an anonymous access, and logged in users would see the wp-cache version (which would say ‘Your logged in as…’) It’s all good.

    During testing it SEEMED to work. But the include seemed to work the first time a page was accessed, then it would disappear the next time (the rest of the page loaded fine).

    Is the mclude stuff broken? Has anyone else seen this type of behavior?

    Also – if I had mclude in my comments.php theme file, will that prevent supercahce from ever caching the page, even if access is from an anonymous user? I didn’t think it would (or should), but haven’t dug into the code to find out.

    Has anyone else gotten a similar situation working where mclude (or mfunc) tags are in effect for logged in users or users with a cookie that have commented? While still having the supercache populated and served for new/anonymous users.

    This is WP 2.5 with latest version of supercache (0.6.3 I think) I tested this with multiple browsers – always the same. Comment form was there then it disappeared.

Viewing 1 replies (of 1 total)
  • I figured it out – I had a function in my include file I forgot was there and since the WP environment isn’t fully loaded in caching – it choked. Still trying to get it working properly now – just need to find the right combination of stuff to load to get the info I need (user identity) Once I figure that out, I should be all set.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: WP Super Cache] Super Cache and mclude…’ is closed to new replies.