WhoKnew Views™ | Caching Recommendations

Skip to main content
Table of Contents
Print

Optimal caching configurations for WhoKnew Views™ — page cache, object cache, and browser cache

Caching is essential for a fast WooCommerce store. WhoKnew Views™ is designed to work seamlessly with all caching layers while maintaining accurate view tracking. Here are our recommendations for optimal configuration.


📊 Caching Layers Overview

Modern WordPress sites use multiple caching layers. Here’s how WhoKnew Views™ interacts with each:

📄

Page Cache

Full HTML pages

→

🔶

Object Cache

Database queries

→

🌐

Browser Cache

Static assets

→

☁️

CDN Cache

Edge servers


✅ Page Caching Recommendations

Full-page caching stores complete HTML pages. WhoKnew Views™ view tracking works correctly with page caching because tracking happens server-side via cookies.

✓ Recommended Settings

Product Pages✅ Safe to cache (1-24 hours recommended)
Shop/Category Pages✅ Safe to cache
Admin Pages (/wp-admin/)❌ Exclude (default in most plugins)
Logged-in Users❌ Exclude (default in most plugins)

⚠️ Note: The displayed view count is rendered when the page cache is generated. If you need real-time view counts (updating every page load), you would need to exclude product pages from caching or use a short TTL.


🔶 Object Caching Recommendations

Object caching (Redis, Memcached) speeds up database queries. WhoKnew Views™ uses WordPress’s wp_cache functions and benefits from object caching.

🔴

Redis

Recommended. Persistent object cache with excellent performance. Works perfectly with WhoKnew Views™.

🟢

Memcached

Also recommended. In-memory caching that speeds up option and transient retrieval.

What object caching improves for WhoKnew Views™:

  • Settings retrieval — whoknew_views_settings loaded faster
  • Transient access — Forecast cache, usage data, cooldown states
  • License status — Cached license checks (Pro)
  • Preset loading — Built-in and user presets

🌐 Browser Caching Recommendations

Browser caching stores static assets locally. WhoKnew Views™ uses versioned assets to ensure updates are seen.

Asset TypeRecommended TTLNotes
CSS Files1 yearVersioned with plugin version
JavaScript1 yearVersioned with plugin version
Icon Fonts1 yearFont Awesome, Ionicons, etc.
Images1 yearPlugin icons and badges

⏱️ WhoKnew Views™ Internal Caching

The plugin uses its own caching for optimal performance:

🔮 Prophet Forecasts24 hours

API responses cached as transients to save credits.

🔑 License Status24 hours

Daily validation with local caching between checks.

⏱️ Visitor CooldownsConfigurable

Per-product cooldown via cookies and transients.

📊 Usage DataMonthly

Forecast credit usage stored in options.


🔧 Plugin-Specific Configurations

Popular caching plugins work out of the box. Here are optional optimizations:

🚀

WP Rocket

Works automatically. Optional tweaks:

  • Keep “Cache for logged-in users” OFF (default)
  • Enable “Separate cache for mobile” if using mobile-specific counter styling

⚡

LiteSpeed Cache

Works automatically with ESI support:

  • Object cache integration works out of the box
  • No exclusions needed for WhoKnew Views™

🌐

W3 Total Cache

Enable these for best performance:

  • Page Cache: Enabled
  • Object Cache: Enabled (Redis/Memcached if available)
  • Browser Cache: Enabled

🔴

Redis Object Cache

Highly recommended for WooCommerce:

  • Speeds up all option and transient retrievals
  • WhoKnew Views™ automatically uses wp_cache functions

🔄 When to Clear Cache

Clear your caching plugin’s cache after:

🎨 Styling Changes

Colors, fonts, icons, position

📝 Display Text

Custom view counter text

👁️ Visibility

Show/hide counter changes

🔌 Plugin Updates

After updating WhoKnew Views™

✅ No Cache Clear Needed: View counts update automatically when the page cache expires. You don’t need to clear cache just because view counts changed.


📋 Quick Configuration Checklist

  • ✅ Page Cache: Enabled with reasonable TTL (1-24 hours)
  • ✅ Object Cache: Redis or Memcached if available
  • ✅ Browser Cache: Enabled for static assets
  • ✅ Admin exclusion: /wp-admin/ excluded (default)
  • ✅ Logged-in exclusion: Logged-in users not cached (default)
  • ✅ Mobile cache: Separate if using mobile-specific styling

💡 Pro Tip: If you’re unsure about your caching setup, WhoKnew Views™ works with default configurations. The plugin is designed to be cache-friendly without special exclusions or rules.

Share