Why Your Speed Optimizer Dynamic Cache Isn't Working (And How to Fix It)
Content
If you're using the Speed Optimizer plugin and finding that your dynamic caching isn't working as expected, you're not alone. A common issue reported by users is the "The URL is not cached" message when using the plugin's Test URLs for Cache Status tool. This article explains why this happens and provides the most common solutions based on community reports.
Why Dynamic Caching Fails: The Core Issue
The primary reason dynamic caching fails to work is the presence of set-cookie headers or PHP sessions on your site. When the Speed Optimizer plugin detects these elements, it intentionally bypasses caching for security reasons. This is a protective measure to prevent sensitive, user-specific information (like shopping cart contents or personal data) from being served to the wrong visitor.
Common indicators of this issue include:
- The "Test URLs for Cache Status" tool consistently returns "The URL is not cached"
- Headers like
set-cookie,Cache-Control: private, orPHPSESSIDappearing in server responses X-Proxy-Cache: MISSheaders instead ofHITwhen checking with curl commands
How to Identify the Source of the Problem
Before attempting fixes, you should confirm that caching is actually not working. Sometimes the testing tool itself might show false negatives, especially if you're logged into your WordPress admin or using Cloudflare (more on this later).
Method 1: Use curl to verify cache status
Open your terminal or command prompt and run:
curl -I -X GET https://yourwebsite.com | grep x-proxy-cache
Look for X-Proxy-Cache: HIT in the response, which indicates successful caching.
Method 2: Check for cookies and sessions
Run: curl -I -X GET https://yourwebsite.com
Examine the output for any set-cookie headers or PHPSESSID references, which indicate something is preventing caching.
Common Causes and Solutions
1. Plugin Conflicts
The most frequent cause of dynamic cache failure is conflicting plugins that initiate PHP sessions or set cookies. Based on community reports, these plugins have been known to cause issues:
- WooCommerce-related plugins (e.g., Notification for WooCommerce)
- Booking plugins (e.g., Bookme Pro)
- Anti-spam/security plugins
- Social sharing plugins (e.g., SocialSnap)
- eCommerce plugins (e.g., Easy Digital Downloads)
- Membership/learning plugins (e.g., LearnDash)
Solution: Perform a conflict test by temporarily deactivating all plugins except Speed Optimizer. If caching works, reactivate plugins one by one, testing after each activation to identify the culprit. Once identified, check the problematic plugin's settings for options to disable sessions or cookies, or consider alternative plugins.
2. Cloudflare Integration
If you're using Cloudflare alongside Speed Optimizer, you might see "URL is not cached" messages even when your site is actually being cached by Cloudflare instead of the Speed Optimizer's dynamic cache.
Solution: This is often expected behavior. Check your cache status using the curl method mentioned above. If you see X-Proxy-Cache: HIT, your content is being cached properly despite what the plugin's test tool shows. The Speed Optimizer team has indicated they're working on improving the test tool's accuracy for Cloudflare users.
3. PHP Sessions
Some plugins or custom code might initiate PHP sessions on every page visit, which prevents caching even for anonymous users.
Solution: Identify and modify the code or plugin settings that create unnecessary sessions. For plugins like Bookme Pro, there are often specific settings that control session creation which can be disabled.
4. Hosting Environment
The Speed Optimizer plugin is primarily designed for SiteGround hosting environments. Some features, particularly dynamic caching, may not work correctly or may be enabled by default on non-SiteGround hosting, which can cause confusion.
Solution: If you're not using SiteGround hosting, check your dynamic caching settings and disable them if they're not functioning properly. The Speed Optimizer team has acknowledged this issue and may address it in future updates.
When Caching Is Actually Working (Despite Error Messages)
In some cases, the test tool might show false negatives. Your caching might be working correctly if:
- You're testing while logged into your WordPress admin (the plugin doesn't cache pages for logged-in users)
- You're using Cloudflare (which takes over caching)
- There's a temporary issue with the test tool itself
Always verify with curl commands or by checking headers directly rather than relying solely on the plugin's test tool.
Conclusion
Dynamic caching issues with the Speed Optimizer plugin typically stem from conflicts with other plugins that set cookies or initiate PHP sessions. The most effective approach is methodical testing: disable plugins one by one, check for session/cookie creation, and verify actual cache status using curl commands rather than relying solely on the plugin's test tool. Remember that if you're using Cloudflare, the "URL is not cached" message might be expected behavior rather than indicating an actual problem with your caching setup.
Related Support Threads Support
-
How to match with Nginx FastCGI cachehttps://wordpress.org/support/topic/how-to-match-with-nginx-fastcgi-cache/
-
Dynamic Caching and Cloudflarehttps://wordpress.org/support/topic/dynamic-caching-and-cloudflare/
-
Installed SG Optimizer; URL doesn’t cachehttps://wordpress.org/support/topic/installed-sg-optimizer-url-doesnt-cache/
-
Dynamic Caching does not appear to be workinghttps://wordpress.org/support/topic/dynamic-caching-does-not-appear-to-be-working/
-
How is SGO Cloudflare dynamic caching work?https://wordpress.org/support/topic/how-is-sgo-cloudflare-dynamic-caching-work/
-
The URL is not cachedhttps://wordpress.org/support/topic/the-url-is-not-cached-4/
-
Dynamic cache not working/ low performancehttps://wordpress.org/support/topic/dynamic-cache-not-working-low-performance/
-
Forum and Contact Formhttps://wordpress.org/support/topic/forum-and-contact-form/
-
Main page not cachedhttps://wordpress.org/support/topic/main-page-not-cached/
-
Confclits with Easy Digital Downloadshttps://wordpress.org/support/topic/confclits-with-easy-digital-downloads/
-
Cache vary for Dynamic cache/Super cache.https://wordpress.org/support/topic/cache-vary-for-dynamic-cache-super-cache/
-
Dynamic Caching option should be OFF if site is not hosted on SGhttps://wordpress.org/support/topic/dynamic-caching-option-should-be-off-if-site-is-not-hosted-on-sg/
-
Dynamic cache keys and behavior with cookieshttps://wordpress.org/support/topic/dynamic-cache-keys-and-behavior-with-cookies/
-
Dynamic Caching not not working.https://wordpress.org/support/topic/dynamic-caching-not-not-working/
-
URL is not Cachedhttps://wordpress.org/support/topic/url-is-not-cached/
-
Using SG Optimizer on Staging Sitehttps://wordpress.org/support/topic/using-sg-optimizer-on-staging-site/
-
Pages are not cachedhttps://wordpress.org/support/topic/pages-are-not-cached-3/
-
Why is the cache test sometimes successful and sometimes not cached?https://wordpress.org/support/topic/why-is-the-cache-test-sometimes-successful-and-sometimes-not-cached/
-
Error while trying to enable dynamic cachinghttps://wordpress.org/support/topic/error-while-trying-to-enable-dynamic-caching/
-
Dynamic Caching not working on my sitehttps://wordpress.org/support/topic/dynamic-caching-not-working-on-my-site/
-
Dynamic Cache Not Workinghttps://wordpress.org/support/topic/dynamic-cache-not-working-2/
-
Dynamic cache – “URL is not cached”https://wordpress.org/support/topic/dynamic-cache-url-is-not-cached/
-
SG Dynamic Caching Error with Jetpackhttps://wordpress.org/support/topic/dynamic-caching-error/
-
Dynamic Cache not working on product pageshttps://wordpress.org/support/topic/dynamic-cache-not-working-on-product-pages/
-
Static assets browser cache not working?https://wordpress.org/support/topic/static-assets-browser-cache-not-working/
-
Help With url not cachedhttps://wordpress.org/support/topic/help-with-url-not-cached/
-
Dynamic Caching “The URL is not cached”https://wordpress.org/support/topic/dynamic-caching-the-url-is-not-cached/
-
Dynamic Caching Not Workinghttps://wordpress.org/support/topic/dynamic-caching-not-working/
-
Almost every page visit regenerate cachehttps://wordpress.org/support/topic/almost-every-page-visit-regenerate-cache/
-
Caching doesn’t workhttps://wordpress.org/support/topic/caching-doesnt-work-3/
-
Cachinghttps://wordpress.org/support/topic/caching-60/
-
Test URLs are saying page not cached, but support claims they arehttps://wordpress.org/support/topic/test-urls-are-saying-page-not-cached-but-support-claims-they-are/
-
Serve static assets with an efficient cache policy – Set Cache TTLhttps://wordpress.org/support/topic/serve-static-assets-with-an-efficient-cache-policy-set-cache-ttl/
-
Siteground, SG Plugin Cache: DYNAMIC (NO HIT)https://wordpress.org/support/topic/siteground-sg-plugin-cache-dynamic-no-hit/