Skip to content

Powerful all-in-one Cloudflare cache solution for WordPress: edge HTML caching, automatic purging, advanced admin controls, API token support, and comprehensive logging.

License

Notifications You must be signed in to change notification settings

LoveDoLove/cloudflare-smart-cache

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

Cloudflare Smart Cache

Powerful all-in-one Cloudflare cache solution for WordPress: edge HTML caching, automatic purging, advanced admin controls, API token support, and comprehensive logging.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

Cloudflare Smart Cache is a powerful WordPress plugin that integrates advanced Cloudflare edge caching and automatic purging. It provides:

  • Edge HTML caching for public pages
  • Automatic cache purging on post, category, and term changes
  • Admin controls for manual purging and cache status
  • API token authentication for secure Cloudflare API access
  • Comprehensive logging and error handling
  • Rate limiting and batch processing for API requests
  • Multi post type support and developer hooks

(back to top)

Built With

(back to top)

Getting Started

To use Cloudflare Smart Cache, you need a WordPress site and a Cloudflare account with an API token.

Prerequisites

  • WordPress 5.0 or higher
  • PHP 7.4 or higher
  • Cloudflare account and API token

Installation

  1. Download or clone the plugin:
    git clone https://github.com/LoveDoLove/cloudflare-smart-cache.git
  2. Upload the plugins/cf-smart-cache.php and related files to your WordPress wp-content/plugins/ directory.
  3. Activate the plugin in the WordPress admin dashboard.
  4. Go to Settings > CF Smart Cache and enter your Cloudflare API token and select your zone.
  5. Save settings and use the admin controls to manage cache.

(back to top)

Usage

After activation and configuration:

  • The plugin will automatically purge Cloudflare cache when posts, categories, or terms are updated or deleted.
  • Use the admin page to manually purge all cache or just the homepage.
  • View cache status and recent API activity in the admin UI.
  • Advanced users can use developer hooks for custom cache logic.

For more details, see the code and admin UI.

(back to top)

Contributing

Contributions are welcome! Please fork the repo and submit a pull request, or open an issue for suggestions and bug reports.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

Top contributors:

contrib.rocks image

License

Distributed under the MIT License. See LICENSE for more information.

(back to top)

Contact

LoveDoLove - @LoveDoLove

Project Link: https://github.com/LoveDoLove/cloudflare-smart-cache

(back to top)

Acknowledgments

(back to top)

About

Powerful all-in-one Cloudflare cache solution for WordPress: edge HTML caching, automatic purging, advanced admin controls, API token support, and comprehensive logging.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published