Caching plugins

3 min read

TTSWP works with every major caching plugin: WP Rocket, LiteSpeed Cache, W3 Total Cache, WP Super Cache, Cache Enabler, and others. The plugin automatically adds its JavaScript and CSS files to cache exclusion lists.

What TTSWP auto-configures

When a supported cache plugin is detected:

  • TTSWP JS files are marked as "do not minify/combine" (prevents breaking the player)
  • TTSWP CSS files are allowed to combine normally
  • The TTSWP admin-bar menu script is served fresh (so it reflects real-time plan changes)
  • Audio files (MP3) are not included in HTML page cache (they have their own expiration headers)

No manual setup is required. It works automatically after TTSWP is activated.

Supported cache plugins (tested)

  • WP Rocket
  • LiteSpeed Cache
  • W3 Total Cache
  • WP Super Cache
  • Cache Enabler
  • Hummingbird
  • Swift Performance
  • Autoptimize

Clearing cache after settings changes

When you change colors, player placement, or voice settings, the front-end needs to see fresh CSS and JS. The plugin clears its own internal caches, but your cache plugin might serve an old version of the page.

After any visible settings change:

  1. Clear your cache plugin's cache
  2. If you use a CDN (Cloudflare, BunnyCDN, etc.), purge it too

Object caching

If your site uses Redis or Memcached via an object cache plugin, TTSWP uses the same cache for:

  • Voice list from ElevenLabs (1 hour)
  • Billing data from app.ttswp.com (24 hours)
  • Usage statistics (5 minutes)

No action needed. Object cache speeds up admin page loads.

Page caching and audio players

Page caching is safe with TTSWP. The player HTML is static per post (it does not change per visitor). Audio files load from a separate URL and are not affected by page cache.

The one case to watch for:

Mixed logged-in / anonymous caching

Some caching plugins serve the same cached page to logged-in admins and anonymous visitors. This can cause admin-only elements (the admin bar menu, for example) to show to everyone. Most plugins handle this correctly by default.

Known cache plugin settings

LiteSpeed Cache

  • Enable Object Cache if you have Redis or Memcached available (speeds up admin)
  • Leave JS Combine disabled on admin screens
  • The plugin auto-excludes mementor-tts-admin.js from optimization

WP Rocket

  • No manual exclusions needed
  • The plugin uses data-no-optimize="1" attributes on its scripts

W3 Total Cache

  • Enable Page Cache for front-end audio pages
  • Leave Minify JS on - the plugin excludes its own scripts automatically

Troubleshooting cached audio not updating

If you regenerated a post's audio but the old audio still plays:

  1. Clear your browser cache (Ctrl+Shift+Delete)
  2. Clear your cache plugin's page cache
  3. Purge your CDN if you use one
  4. Hard-refresh the post page (Ctrl+Shift+R)

Audio files are served with their own timestamp in the URL, so the browser should normally fetch the new version. If it does not, one of the caches above is the culprit.