Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wp-digital/wp-flush-cache
WordPress plugin for flushing cache
https://github.com/wp-digital/wp-flush-cache
Last synced: about 2 months ago
JSON representation
WordPress plugin for flushing cache
- Host: GitHub
- URL: https://github.com/wp-digital/wp-flush-cache
- Owner: wp-digital
- Created: 2016-05-26T10:37:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2020-12-30T15:43:36.000Z (about 4 years ago)
- Last Synced: 2024-11-13T17:49:21.822Z (2 months ago)
- Language: PHP
- Size: 27.3 KB
- Stars: 1
- Watchers: 12
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Flush Cache Buttons
### Description
Helps to flush different types of cache.
### Install
- Preferable way is to use [Composer](https://getcomposer.org/):
````
composer require innocode-digital/wp-flush-cache
````By default, it will be installed as [Must Use Plugin](https://codex.wordpress.org/Must_Use_Plugins).
It's possible to control with `extra.installer-paths` in `composer.json`.- Alternate way is to clone this repo to `wp-content/mu-plugins/` or `wp-content/plugins/`:
````
cd wp-content/plugins/
git clone [email protected]:innocode-digital/wp-flush-cache.git
cd wp-flush-cache/
composer install
````If plugin was installed as regular plugin then activate **Flush Cache Buttons** from Plugins page
or [WP-CLI](https://make.wordpress.org/cli/handbook/): `wp plugin activate wp-flush-cache`.### Usage
From the box this plugin adds possibility to flush object cache in case when site uses
[Persistent Caching](https://developer.wordpress.org/reference/classes/wp_object_cache/#persistent-caching),
if not, then [Transients](https://developer.wordpress.org/apis/handbook/transients/).#### Notes
In [Network](https://wordpress.org/support/article/create-a-network/) global caches could be flushed from
network admin area and individual from each site admin area. Also, it's possible to flush individual cache
from sites list in network admin area.### Documentation
Adds flush button with a callback to site admin area: `/wp-admin/tools.php?page=innocode_cache-control`
(**Tools** -> **Cache**).```
flush_cache_add_button( string $title, callable $callback, string $description = '' );
```---
Adds flush button with a callback to network admin area: `/wp-admin/network/admin.php?page=innocode_cache-control`.
```
flush_cache_add_network_button( string $title, callable $callback, string $description = '' );
```---
Adds action link with a callback to network admin area to the sites list: `/wp-admin/network/sites.php`.
```
flush_cache_add_sites_action_link( string $title, callable $callback, string $description = '' );
```