Title: Logged In User Cache
Last modified: August 21, 2016

---

# Logged In User Cache

 *  [Nitac](https://wordpress.org/support/users/mchl/)
 * (@mchl)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/logged-in-user-cache/)
 * From the searching I’ve done this seems to be a somewhat common issue for a few
   people but I haven’t managed to find a solution the works for me.
 * The majority of users that visit our site are more than likely registered and
   logged in when browsing so I have enabled the ‘Don’t cache pages for logged in
   users’ option, but I’m having issue with cached content still being served after
   a user has logged in and the logged in users cache content being served to new
   visitors.
 * Here’s a scenario:
 * – User1 visits the homepage not logged in
    – User1 visits page A not logged in–
   User1 logs into site and is redirected to the homepage – User1 appears to not
   logged in on homepage and page A (served cached content) – User1 visits page 
   B and can see they are logged in (newly generated cached page) – User2 (not logged
   in) visits page B and is served User1’s cached content.
 * Ive tried this scenario for admins and subscribers so doesn’t appear isolated
   to a role.
 * It seems like the ‘Don’t cache pages for logged in users’ option isn’t working.
   But I’m not sure what other options I can try to rectify the problem, so would
   be great if anyone had any thoughts.
 * Thanks
 * [https://wordpress.org/plugins/w3-total-cache/](https://wordpress.org/plugins/w3-total-cache/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [Nitac](https://wordpress.org/support/users/mchl/)
 * (@mchl)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/logged-in-user-cache/#post-4941836)
 * Ive found if User1 visits a page then logs in from another page, and visits the
   original page (cached content) they are still not logged in.
 * But, if I refresh the page i can see the user is logged in.
 * Any help would be greatly appreciated.
 * Thanks
 *  [gbell12](https://wordpress.org/support/users/gbell12/)
 * (@gbell12)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/logged-in-user-cache/#post-4941943)
 * Big security concern! Honestly, caching on any site with a member’s area seems
   dangerous. The number of complaints/problems/bugs people post regarding this 
   seems like, even with the “Don’t cache pages for logged-in users” feature, you
   risk serving secure pages to the wrong people.
 * And, unfortunately, the developers seem swamped with support requests and aren’t
   able to address this issue.
    [Pages are still being cached for logged in users](http://wordpress.org/support/topic/pages-are-still-being-cached-for-logged-in-users)
   [Total cache will not let homepage update for logged out users](http://wordpress.org/support/topic/w3-total-cache-will-not-let-homepage-update-for-logged-out-users)
   [Logged-in users can’t tell they’re logged in](http://wordpress.org/support/topic/logged-in-users-cant-tell-theyre-logged-in)
 * The best response I can find from Frederick is [this one](http://wordpress.org/support/topic/plugin-w3-total-cache-caching-for-logged-in-users-but-separate-from-the-mob?replies=5)
   where he says fragment caching is the way to go. It seems easy enough, but I’d
   only feel confident if I could find good documentation on how this works and 
   why it should be save.
 *  [gbell12](https://wordpress.org/support/users/gbell12/)
 * (@gbell12)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/logged-in-user-cache/#post-4941944)
 * There is an [extensive FAQ](http://www.w3-edge.com/products/w3-total-cache#prefix-tab-2)
   I just found.
 * Unfortunately, the little bit on fragmented caching doesn’t render. If you look
   at the source code, you’ll see why – HTML comments 🙂
 * Here’s what it should say:
 * >  How do I implement fragment caching?
   >  Edit your templates to with the following
   > syntax to ensure that dynamic features remain so:
   > Example 1:<!– mfunc any PHP code –><!– /mfunc –>
   >  Example 2:<!– mfunc –>any
   > PHP code<!– /mfunc –> Example 3:<!–MFUNC –> echo rand();<!–/mfunc –> Example
   > 4:<!– mclude path/to/file.php –><!– /mclude –> Example 5:<!– mclude –>path/
   > to/file.php<!– /mclude –>
 * Not sure that really clears anything up 🙂 Inconsistent capitalization and spacing
   is a worry. The call to rand() is an interesting idea – it is a way of uniquely
   identifying a page render so that you can tell if you’re seeing a cached copy
   or not.
 *  Thread Starter [Nitac](https://wordpress.org/support/users/mchl/)
 * (@mchl)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/logged-in-user-cache/#post-4941945)
 * I’ve actually moved on and have started using another caching plugin which handles
   user caching amongst other things in a simpler way than W3TC.
 * I’m sure someone else will find this info useful though.
 * Cheers for the response.
 *  [gbell12](https://wordpress.org/support/users/gbell12/)
 * (@gbell12)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/logged-in-user-cache/#post-4941946)
 * Hi mchl – please share which plugin you found.
 * Here’s a response from W3TC:
    _ Are you a W3 Total Cache Pro customer? Pro unlocks
   fragment caching in W3TC, which is needed to accomplish what you’re doing. Initial
   documentation is limited, but what’s there is enough to get you started if you
   know your way around WordPress theme development. Fragment caching in W3TC is
   just utilizing the WordPress Transients API, we’re not doing anything proprietary.
 *  Thread Starter [Nitac](https://wordpress.org/support/users/mchl/)
 * (@mchl)
 * [11 years, 10 months ago](https://wordpress.org/support/topic/logged-in-user-cache/#post-4941947)
 * Ive ended using Quick Cache Pro (Everything I needed with very simple and minimal
   set up) after trialling a few different plugins, on top of the user cache issue
   i was having i found the WT3C slowed down the admin too much aswell. I was also
   deterred by their support as the pricing structure was too vague.
 *  [garciasanchezdani](https://wordpress.org/support/users/garciasanchezdani/)
 * (@garciasanchezdani)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/logged-in-user-cache/#post-4941948)
 * Hi [@mchl](https://wordpress.org/support/users/mchl/) , I just installed w3 total
   cache plugin, because my website loads very very slow. This plugin increases 
   the load of the site, **but now I’m having just your same problem.**
    The caching
   is bad in the way of logged and not logged users…..what did you do at the end?
   what plugin are you using?
 * I imagine that in paid version of w3 total cache, this issue isn’t happening 
   and it’s fixed…
 * Regards, Daniel

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Logged In User Cache’ is closed to new replies.

 * ![](https://ps.w.org/w3-total-cache/assets/icon-256x256.png?rev=1041806)
 * [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/w3-total-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/w3-total-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/w3-total-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/w3-total-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/w3-total-cache/reviews/)

## Tags

 * [don't cache](https://wordpress.org/support/topic-tag/dont-cache/)
 * [user](https://wordpress.org/support/topic-tag/user/)

 * 7 replies
 * 3 participants
 * Last reply from: [garciasanchezdani](https://wordpress.org/support/users/garciasanchezdani/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/logged-in-user-cache/#post-4941948)
 * Status: not resolved