API Caching reduces database queries by storing API responses in fast-access memory. This optimization accelerates load times for feeds, menus, pages, and membership content. This document explains how to enable API Caching, verify installation, configure cache settings, and troubleshoot common caching issues.
Understanding API Caching
API Caching stores frequently accessed data in memory rather than querying the WordPress database for each request. The first request retrieves data from the database and caches it. Subsequent requests serve data directly from cache, resulting in faster response times and reduced server load.
Enabling API Performance Component
The API Performance component must be activated before caching configuration can begin.
- Navegue até Dashboard > MP App > Components.
- Locate API Performance in the components list.
. - Clique em Ativar.

The API Performance component provides caching capabilities and other optimization features for the app.
Verifying Must-Use Plugin Installation
API Caching requires a must-use plugin to function correctly. Verification ensures the plugin is properly installed.
- Navegue até Dashboard > Plugins > Must-Use.
- Confirm that MP App API Caching appears in the plugin list.

Configuring Cache Settings
Cache settings determine which content types utilize caching functionality.
- Navegue até Dashboard > MP App > Settings > API Caching.
- Select the checkboxes for content types to cache:
- MemberPress
- App Pages
- Publicações do blog
- Blog Comments
- Blog Categories
- Post Bookmarks

- Clique em Salvar alterações.
Managing Cached Data
Cached data must be purged when content updates occur to ensure users see current information.
Purging Individual Cache Items
- Navegue até Dashboard > MP App > Settings > API Caching.
- Locate the cached content type requiring purging.
- Clique em Purge Cache next to the specific item.

Individual cache purging allows selective clearing without affecting other cached content.
Purging All Cached Data
- Navegue até Dashboard > MP App > Settings > API Caching.
- Clique em Purge All at the top of the caching settings.

All cached data clears immediately, and fresh data populates on the next API request.
Understanding Cache Behavior
API Caching follows a predictable workflow that balances performance with data freshness.
Initial Request Process
When a user first requests cached content:
- The API receives the request from the app.
- The API queries the WordPress database for the requested data.
- The API stores the response in the cache system.
- The API returns the data to the user.
This initial request experiences standard database query times.
Subsequent Request Process
After data is cached, future requests follow an optimized path:
- The API receives the request from the app.
- The API retrieves data directly from cache memory.
- The API returns the cached data instantly to the user.
Cached requests complete significantly faster than database queries.
Automatic Cache Purging
Cache purges automatically when content changes occur:
- New posts or pages are published;
- Existing content updates or deletes;
- Membership levels change;
- Plugin settings are modified.
Automatic purging ensures users receive current data without manual intervention.