Introduction
API Caching dramatically accelerates your BuddyBoss App by serving repeat data requests from a fast, in-memory store instead of repeatedly querying your database. This reduces load on your server and delivers sub-second responses for social feeds, courses, menus, and more.
Tutorial VIdeo
Enabling the API Performance Component
- In your WordPress admin, go to BuddyBoss App > Components.
- Toggle on API Performance and click Save Changes.
Verifying the Must-Use Plugin
- Navigate to Plugins > Must-Use and confirm BuddyBoss API Caching is installed.
- If missing, a notice will guide you to download and place it in wp-content/mu-plugins/, then refresh.
- If missing, a notice will guide you to download and place it in wp-content/mu-plugins/, then refresh.
Configuring API Caching
- Go to BuddyBoss App > Settings > API Caching.
- Check all the content types you want cached (App Pages, Posts, Social Feeds, LearnDash, etc.).
- Click Save Changes.
Purging Cached Data
- Purge Cache next to a feature to clear its cache only.
- Purge All to reset every cache at once.
How It Works
- First Request: API fetches fresh data from WordPress and stores it.
- Subsequent Requests: API serves the cached response instantly.
- Cache Invalidation: When you or users change data (e.g., new message), the related cache is automatically purged so updated content appears immediately.
Note: If you have third-party plugins or custom endpoints, add code to call bb_api_cache_purge() on relevant hooks so the cache stays fresh. Full developer docs are available in our knowledge base.
Troubleshooting & FAQs
Q: The BuddyBoss API Caching plugin isn’t in Must-Use Plugins.
A: Your server may block auto-install. Download it from the admin notice and place it in wp-content/mu-plugins/, then reload the admin.
Q: Cached content remains stale after updates.
A: Use Purge Cache for that feature, or in custom code fire bb_api_cache_purge( $cache_key ) when your data changes.
Q: Errors occur when purging all caches.
A: Confirm the wp_bb_api_cache database table exists and that your DB user has DELETE permissions on it.
Q: Can I disable caching for a specific endpoint?
A: Yes. Uncheck its box under BuddyBoss App > Settings > API Caching and hit Save Changes.
Q: How do I know caching is effective?
A: Observe response times: initial requests take longer as they populate the cache; repeat requests return almost instantly.