=== hamecache ===

Contributors: Hametuha, Takahashi_Fumiki  
Tags: cache, cloudflare  
Requires at least: 5.0  
Tested up to: 5.2.1  
Requires PHP: 5.6  
Stable tag: 1.0.0  
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Page cache plugin by Hametuha. Use cloudflare for distribution.

== Description ==

[CloudFlare](https://cloudflare.com) is a popular CDN service. They caches static files like `.jpg`, `.css` or `.html`, but they doesn't cache dynamic pages generated by WordPress without [Page Rule](https://www.cloudflare.com/features-page-rules/must-use-page-rules/).

Once Page Rules are set, for exmple, `https://examle.com/article/*`, every single page will be cached(of course, your permalink structure should be like `https://example.com/article/2019/01/01/POST_ID`).

This plugin **hamecache** provides cache control feature. If you update your article, hamecache automatically flush related caches  on cloudflare edge location.

== Installation ==

1. Upload `hamecache` directory to the `/wp-content/plugins/` directory.
1. Activate the plugin through the 'Plugins' menu in WordPress.
1. Go to 'Setting > Cache Setting' and enter your email address and API key which you can get your profile page on [cloudflare](https://dash.cloudflare.com)
1. Select URL to be purged. Post type, top page, extra pages, and so on.

== Frequently Asked Questions ==

= How can I contribute? =

We host our sources on [GitHub](https://github.com/hametuha/hamecache), so please feel free to send [PR](https://github.com/hametuha/hamecache/pulls) or to make [issues](https://github.com/hametuha/hamecache/issues).

= I have custom pages. How can I purge these URLs? =

You can use `hamecache_urls_to_be_purged` filter hook for them. 

<pre>add_filter( 'hamecache_urls_to_be_purged', function( $urls, $post ) {
    // Add your custom URL.
    $urls[] = your_custom_link( $post );
    return $urls;
}, 10, 2 );</pre>

== Screenshots ==

1. You can purge caches for post from admin bar.
2. Setting screen. Select post types with which page rules are matching.

== Changelog ==

= 1.0.0 =

* First releaes.

= 0.9.0 =

* First package for plugin repository.
