Effective caching is about striking a balance between long‑term efficiency and the ability to update
quickly when needed. For assets that rarely change—images, fonts, and static media—configure long
expiries in the range of 180 to 365 days. This allows returning visitors to load those resources
directly from their browser cache, dramatically cutting bandwidth and improving repeat performance. For
CSS and JavaScript, use shorter expiries when your site is under active development or deploying
frequent theme/plugin updates. A common pattern is 7 to 30 days; when changes are infrequent, 90 to 180
days also works well, and you can force refreshes on deploy via cache busting strategies.
In the plugin’s Cache module, enable the relevant MIME families and set expiry days for each group. If
you rely on query‑string versioning (e.g., style.css?ver=1.2.3), you can keep long expiries
because new versions will be treated as distinct URLs. If you remove version info for aesthetics, be
sure your deployment pipeline rewrites file names or triggers purges; otherwise, visitors might keep
stale assets longer than intended. Use the “Prevent cache” option to exclude dynamic endpoints like
admin-ajax.php, feeds, or API routes from browser caching.
After saving, verify that .htaccess includes the plugin markers and that responses show
appropriate Cache-Control, Expires, and optional Last-Modified
headers. Pair browser caching with CDN edge caching when available, but avoid stacking multiple
origin‑side cache plugins. With this configuration, first visits are fast and subsequent visits are even
faster, providing a repeatable improvement to user experience.