Opened 13 years ago
Closed 13 years ago
#3841 closed defect (bug) (fixed)
BuddyPress wipes out Wordpress cache
Reported by: | sooskriszta | Owned by: | |
---|---|---|---|
Milestone: | 1.6 | Priority: | normal |
Severity: | normal | Version: | 1.5.1 |
Component: | Core | Keywords: | |
Cc: | sooskriszta |
Description ¶
Everytime there is a login into Buddypress, the whole Wordpress cache is wiped out.
Some discussion here:
http://wordpress.org/support/topic/plugin-wp-super-cache-clear-cache-when-user-login
http://wordpress.org/support/topic/plugin-wp-super-cache-clear-cache-when-buddypress-user-login
Pull Requests
- Loading…
Change History (6)
#1
@
13 years ago
- Keywords 2nd-opinion added
- Milestone changed from Awaiting Review to Future Release
- Severity changed from critical to normal
#2
@
13 years ago
I do agree that wiping out the entire cache on login is a little too aggressive, especially if the WP install has whitelisted BP pages from caching.
I think we need to dive into WP Super Cache's dev docs to figure out what our options are:
http://ocaoimh.ie/wp-super-cache-developers/
#3
@
13 years ago
While I agree to remove it from the log in action, bp_core_clear_cache() is used on so many other actions, it probably won't do much to actually resolve the problem. (I think Super Cache doesn't do anything if you're a logged-in user, so clearing the visitor page cache when a logged-in user does something like add a new activity makes some sense.)
#4
@
13 years ago
The huge issue is that BuddyPress wipes out the whole cache for WordPress. So if someone logs into BuddyPress, then from that point on, even (not logged in) visitors to the Wordpress part see uncached pages.
At maximum BuddyPress should wipe out cache for BuddyPress section to account for activity and other freshness-focused actions.
But:
- Login is the wrong trigger. Post or other actions would probably be better.
- Wiping out the cache may not even be a good answer. Perhaps logged in users can be shown uncached versions.
But even all that is unnecessary. WP Super Cache has an option to disable cache for logged in users...so they can always see the "freshest" page
Can anyone articulate the original purpose for this cache clearing, aside from the somewhat vague inline comment: "When wp-super-cache is installed this function will clear cached pages so that success/error messages are not cached, or time sensitive content."
Clearing cache on login doesn't really make any sense anyway. If you were really that concerned about caching time-sensitive content, you would clear that cache on every page load. (I'm not suggesting that we do that!)
Can we just remove this bit altogether? For proper cache clearing, depend on two things:
Objections?