• Hello,

    I have been using WordPress Total Cache for a while now and have to admit that this is one hell of a plugin. Although its not all that easy to configure, one you get it right its probably the last plugin you’ll ever consider getting rid of…

    Now on one of my BuddyPress installs, I feel like i’m not getting maximum potential out of page caching, and here’s why…

    Like many other websites out there, I have a user avatar and profile name at the top right of every page. My site is only accessible to logged in users so using the “do not cache for logged in users” setting is out of the question.

    Every time a page is cached, it saves the current user’s avatar and name combo and serves it up to every other user until it is cached again. Obviously this is confusing for the users and pointless all together.

    Enter “fragment caching” which seems to be supported by WTC. This is supposed to let you load some bits of a page dynamically while caching the rest of it. But I saw something about it not working with code that relies on WordPress headers… so how can this work for anything else that 3rd party banner servers?

    I’ve tried implementing the suggested tags to make my picture and user name dynamic, but it seems to make the entire page dynamic although page caching is enabled.

    Does anyone have some insight on how to use this? The few lines of code examples in the FAQ really aren’t getting me anywhere and I really feel like i’m missing something…

    Any help would be much appreciated.
    C.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mistercyril

    (@mistercyril)

    For those familiar with BuddyPress, here is what i’d like to keep dynamic in my header :

    <div><a href="<?php bp_loggedin_user_domain() ?>" style="float:right;padding:0 10px 0px 10px;"><?php bp_loggedin_user_avatar( 'width=50&height=50' ) ?></a><p>Bonjour <?php bp_loggedinuser_link(); ?> !<br/><a style="font-size:11px;" href="<?php echo wp_logout_url(get_permalink()); ?>" title="Déconnexion">Déconnexion</a></p></div>

    When i wrap : <?php bp_loggedin_user_avatar( 'width=50&height=50' ) ?> with the suggested fragment caching syntax, I get the following : <!-- mfunc bp_loggedin_user_avatar( 'width=50&height=50' ) --><!-- /mfunc -->

    But my users get a blank white page when using this code in the template…
    This test was done using (Disk Basic) caching, as per a post frederick responded to.

    Plugin Contributor Frederick Townes

    (@fredericktownes)

    Are there any errors in your error log?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WTC & BuddyPress fragment caching’ is closed to new replies.