Skip to:
Content

BuddyPress.org

Opened 12 years ago

Closed 12 years ago

#3841 closed defect (bug) (fixed)

BuddyPress wipes out Wordpress cache

Reported by: sooskriszta's profile sooskriszta Owned by:
Milestone: 1.6 Priority: normal
Severity: normal Version: 1.5.1
Component: Core Keywords:
Cc: sooskriszta

Change History (6)

#1 @boonebgorges
12 years ago

  • Keywords 2nd-opinion added
  • Milestone changed from Awaiting Review to Future Release
  • Severity changed from critical to normal

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:

  • BP functions that update a database value that is cached should be running wp_update_cache() (I don't know of anywhere where this does *not* happen)
  • if there is a problem with a specific kind of content, site admins can configure WPSC to ignore that URL

Objections?

#2 @r-a-y
12 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 @DJPaul
12 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 @sooskriszta
12 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:

  1. Login is the wrong trigger. Post or other actions would probably be better.
  2. 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

#5 @DJPaul
12 years ago

  • Keywords 2nd-opinion removed
  • Milestone changed from Future Release to 1.6

#6 @djpaul
12 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [5663]) Don't clear WP Super Cache's cache on log in. Fixes #3841

Note: See TracTickets for help on using tickets.