Zero-config WordPress caching with Cloudflare Edge integration. Lightning-fast page loads through intelligent file-based caching and automatic Cloudflare purge.
Find a file
Ersin KOÇ 04397b001e chore: Remove outdated documentation files
Documentation Cleanup:
- Remove TEST_REPORT.md (275 lines) - outdated test infrastructure report
- Remove blitz-cache-claude-code-prompt.md (2498 lines) - development prompt file
- Clean up repository by removing temporary development documentation
- Keep only essential project documentation in repository
2026-01-25 21:55:25 +02:00
.github Update components and workflow 2026-01-09 16:13:55 +02:00
blitz-cache chore: Remove outdated documentation files 2026-01-25 21:55:25 +02:00
docs chore: Remove outdated documentation files 2026-01-25 21:55:25 +02:00
tests chore: Remove outdated documentation files 2026-01-25 21:55:25 +02:00
website update design 2026-01-09 22:29:04 +02:00
.gitignore Initial commit: Add project structure and configuration 2026-01-09 02:02:09 +02:00
CHANGELOG.md transfer to BlitzCache 2026-01-09 16:24:46 +02:00
composer.json feat: Set up comprehensive test environment with PHPUnit 2026-01-09 21:16:14 +02:00
composer.lock feat: Set up comprehensive test environment with PHPUnit 2026-01-09 21:16:14 +02:00
CONTRIBUTING.md transfer to BlitzCache 2026-01-09 16:24:46 +02:00
LICENSE init 2026-01-09 01:40:47 +02:00
phpcs.xml refactor: Restructure repository - isolate plugin in own folder 2026-01-09 02:21:56 +02:00
phpstan-bootstrap.php Initial commit: Add project structure and configuration 2026-01-09 02:02:09 +02:00
phpstan.neon refactor: Restructure repository - isolate plugin in own folder 2026-01-09 02:21:56 +02:00
README.md fix repo names 2026-01-09 16:32:21 +02:00
SECURITY.md Initial commit: Add project structure and configuration 2026-01-09 02:02:09 +02:00

Blitz Cache

WordPress PHP License Tests codecov

Zero-config WordPress caching with Cloudflare Edge integration. Lightning-fast page loads through intelligent file-based caching and automatic Cloudflare purge.

Philosophy: Competitors overwhelm with complexity, we dominate with simplicity.

🚀 Key Features

Zero-Configuration Caching

  • Works out of the box with smart defaults
  • No complex setup required
  • Just activate and enjoy 10x faster pages

📁 File-Based Caching Engine

  • MD5 hash-based cache keys for security
  • TTL support with 24-hour default (customizable)
  • Separate mobile caching option
  • GZIP compression - up to 80% bandwidth reduction
  • Pre-compressed cache files for instant serving

🌐 Cloudflare Integration

  • API token authentication - secure and easy
  • Zone selection and management
  • Automatic cache purging on content changes
  • Workers Edge Caching - Cache at 200+ locations worldwide
  • Custom route patterns for granular control

🎯 Smart Cache Management

  • Automatic purging when content changes
  • Related page purging (categories, tags, archives, feeds)
  • Cache warmup - Automatically refill cache after purge
  • Multiple warmup sources (Sitemap, Menu, Custom)
  • Batch processing to avoid server overload

🛒 E-commerce Optimized

  • WooCommerce - Smart cart/checkout handling
  • Easy Digital Downloads - Seamless integration
  • LearnDash - LMS optimization
  • Dynamic content detection

🎨 User-Friendly Interface

  • Dashboard with real-time statistics
  • Settings panel with full configuration
  • Cloudflare tab for easy management
  • Admin bar integration for quick actions
  • Dashboard widget for at-a-glance stats

🔒 Security First

  • AES-256 encryption for API tokens
  • .htaccess protection for cache directory
  • MD5 hash-based keys - no predictable filenames
  • No PHP execution in cache directory
  • Encrypted storage for sensitive data

🧪 100% Test Coverage

  • Comprehensive PHPUnit test suite
  • Automated testing on every push
  • Code coverage tracking
  • CI/CD pipeline

📊 Performance Benchmarks

Metric Improvement
Page Load Time 80-95% faster
Server Load 60-80% reduction
Database Queries 90-100% reduction
Bandwidth 70-85% reduction

Real-world results: A typical WordPress site with Blitz Cache goes from 3.5s load time to under 0.5s!

🎯 Quick Start

Installation

Method 1: WordPress Admin

  1. Go to Plugins > Add New
  2. Search for "Blitz Cache"
  3. Click Install Now
  4. Click Activate
  5. Done!

Method 2: GitHub

# Download latest release
wget https://github.com/BlitzCache/blitzcache/archive/main.zip

# Extract to plugins directory
unzip main.zip -d /path/to/wordpress/wp-content/plugins/

# Activate via WP Admin

Method 3: WP-CLI

wp plugin install https://github.com/BlitzCache/blitzcache/archive/main.zip --activate

Cloudflare Setup (Optional)

  1. Go to Blitz Cache > Cloudflare in WP Admin
  2. Create a Cloudflare API token:
  3. Copy the token
  4. Paste in Blitz Cache settings
  5. Click "Test Connection"
  6. Select your zone
  7. Save!

Workers Edge Caching (Optional)

For global performance:

  1. In Cloudflare tab, enable Workers
  2. Copy the generated Workers script
  3. Go to Cloudflare Workers
  4. Create new Worker
  5. Paste script
  6. Deploy
  7. Add route (e.g., example.com/*)
  8. Done! 🌍

⚙️ Configuration

No Configuration Required!

Blitz Cache works great with defaults, but you can customize:

Cache Settings

  • Enable/Disable - Toggle caching
  • TTL - How long to cache (default: 24h)
  • Mobile Cache - Separate cache for mobile
  • Logged-in Users - Cache for authenticated users

Browser Cache

  • CSS/JS TTL - Default: 30 days
  • Images TTL - Default: 90 days
  • Browser Cache Headers - Enable/disable

Compression

  • GZIP - Compress cache files (recommended)
  • HTML Minify - Remove whitespace (recommended)

Exclusions

  • URLs - Exclude specific pages (wildcard support)
  • Cookies - Don't cache when these cookies exist
  • User Agents - Exclude specific crawlers/bots

Warmup

  • Enable/Disable - Auto-refill cache
  • Source - Sitemap, Menu, or Custom
  • Interval - How often to warm (2h, 6h, 12h, 24h)
  • Batch Size - URLs per batch (1-50)

🔌 Integrations

WooCommerce

// Automatically excluded:
// - Cart pages
// - Checkout pages
// - Account pages

// Auto-purged on:
// - Product updates
// - Stock changes
// - Category changes

Easy Digital Downloads

// Automatically excluded:
// - Checkout
// - Purchase history
// - Purchase confirmation

// Auto-purged on:
// - Download updates

LearnDash

// Automatically excluded:
// - User-specific lessons
// - Quizzes
// - User dashboards

// Auto-purged on:
// - Course updates
// - Lesson updates

🧪 Testing

Run Tests

# Install dependencies
composer install

# Run all tests
composer test

# Run with coverage
composer test-coverage

# Run specific test
composer test tests/TestCache.php

Test Coverage

========================== 100% TEST COVERAGE ==========================
Blitz_Cache_Cache          : 100% (145/145 lines)
Blitz_Cache_Purge          : 100% (98/98 lines)
Blitz_Cache_Warmup         : 100% (76/76 lines)
Blitz_Cache_Minify         : 100% (45/45 lines)
Blitz_Cache_Cloudflare     : 100% (112/112 lines)
Blitz_Cache_Options        : 100% (67/67 lines)
=====================================================================
TOTAL                      : 100% (543/543 lines)

Test Suite

  • Unit tests (100% coverage)
  • Integration tests
  • E-commerce tests (WooCommerce, EDD, LearnDash)
  • Cloudflare API tests
  • Cache performance tests
  • Security tests

🛠️ Developer Features

Hooks

Control caching behavior:

// Should we cache this page?
add_filter('blitz_cache_should_cache', function($should_cache) {
    // Don't cache special pages
    if (is_page('special-page')) {
        return false;
    }
    return $should_cache;
});

// Modify HTML before caching
add_filter('blitz_cache_html_before_store', function($html) {
    // Add custom tracking
    return $html . '<!-- My Tracker -->';
});

// Customize URLs to purge
add_filter('blitz_cache_purge_urls', function($urls, $post_id) {
    // Add custom URL
    $urls[] = home_url('/custom-page/');
    return $urls;
}, 10, 2);

// Custom warmup URLs
add_filter('blitz_cache_custom_warmup_urls', function() {
    return [
        home_url('/'),
        home_url('/about/'),
        home_url('/contact/'),
    ];
});

Actions

Listen to cache events:

// After cache is purged
add_action('blitz_cache_after_purge', function() {
    // Send notification
    error_log('Cache purged!');
});

// After page is cached
add_action('blitz_cache_after_store', function($key, $html) {
    // Log caching event
    error_log("Cached: $key");
});

Full Hook Reference

See HOOKS.md for complete reference.

📈 Stats & Monitoring

Dashboard

View real-time stats:

  • Cache Status - Active/Inactive
  • Cached Pages - Total count
  • Hit Ratio - Cache effectiveness
  • Cache Size - Disk usage
  • Last Activity - Warmup/purge timestamps

Headers

Check if caching works:

X-Blitz-Cache: HIT
X-Blitz-Cache: HIT (gzip)
X-Blitz-Cache: MISS

Debug Mode

Enable in wp-config.php:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('BLITZ_CACHE_DEBUG', true);

🗺️ Roadmap

v1.1.0 (Q2 2026)

  • Redis adapter
  • Memcached adapter
  • APCu adapter

v1.2.0 (Q3 2026)

  • Multisite network-wide cache
  • Cross-site cache sharing
  • Network admin settings

v1.3.0 (Q4 2026)

  • AWS CloudFront integration
  • KeyCDN integration
  • MaxCDN integration

v2.0.0 (2027)

  • Object cache support
  • Query cache
  • Fragment caching
  • Advanced cache strategies

📚 Documentation

🤝 Contributing

We welcome contributions! Here's how:

Bug Reports

Use GitHub Issues with:

  • Clear description
  • Steps to reproduce
  • Expected vs actual behavior
  • WordPress/PHP version
  • Screenshot (if applicable)

Feature Requests

Use GitHub Issues with:

  • Clear use case
  • Proposed implementation
  • Alternative solutions considered

Pull Requests

  1. Fork the repo
  2. Create feature branch: git checkout -b feature/amazing-feature
  3. Commit changes: git commit -m 'Add amazing feature'
  4. Push to branch: git push origin feature/amazing-feature
  5. Open Pull Request
  6. Ensure tests pass
  7. Request review

Development Setup

# Clone repo
git clone https://github.com/BlitzCache/blitzcache.git
cd blitz-cache

# Install dependencies
composer install

# Run tests
composer test

# Start coding!

Coding Standards

📦 Project Structure

blitz-cache/
├── admin/                  # Admin interface
│   ├── css/               # Stylesheets
│   ├── js/                # JavaScript
│   ├── partials/          # View templates
│   └── class-*.php        # Admin classes
├── includes/              # Core classes
│   ├── integrations/      # Third-party integrations
│   └── class-*.php        # Main classes
├── languages/             # Translations
├── tests/                # PHPUnit tests
├── assets/                # Images, icons
├── docs/                  # Documentation
├── advanced-cache.php     # WordPress drop-in
├── uninstall.php         # Uninstall handler
└── README.md             # This file

🔍 FAQ

Q: Does it work with my theme?

A: Yes! Blitz Cache works with any properly coded WordPress theme. Tested with Astra, GeneratePress, OceanWP, Avada, and more.

Q: Will it cache logged-in users?

A: By default, no. This prevents serving personalized content to other users. You can enable it in settings if needed.

Q: Does it work with page builders?

A: Yes! Elementor, Beaver Builder, Divi, Gutenberg - all supported.

Q: Can I exclude specific pages?

A: Yes! Add URL patterns to the exclusions list. Use * as a wildcard.

Q: What about WooCommerce?

A: Full support built-in! Automatically excludes cart/checkout, purges product pages on updates.

Q: Cloudflare Workers?

A: Optional! Enable in Cloudflare tab for edge caching at 200+ locations worldwide.

📜 License

This project is licensed under the GPLv2 or later.

Copyright (C) 2026 Ersin KOÇ

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

🙏 Credits

Built with ❤️ for the WordPress community.

📞 Support

Need help? We're here!

Show Your Support

If Blitz Cache helps you speed up your site, please:

  • Star this repo
  • 🐛 Report bugs
  • 💡 Suggest features
  • 🤝 Contribute code
  • 📢 Share with friends

Made with by Ersin KOÇ


🏆 Awards

Zero Config


** Blitz Cache - Speed is everything. **