Skip to content

Commit

Permalink
Added WP-CLI command docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tillkruss committed Sep 19, 2016
1 parent 06c4307 commit d9ccee1
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 3 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,3 +98,29 @@ define( 'WP_REDIS_CLUSTER', [
'tcp://127.0.0.2:6379?database=15&alias=node-02',
] );
```

### WP-CLI Commands

To use the WP-CLI commands, make sure the plugin is activated:

```
wp plugin activate redis-cache
```

The following commands are supported:

* `wp redis status`

Show the Redis object cache status and (when possible) client.

* `wp redis enable`

Enables the Redis object cache. Default behavior is to create the object cache drop-in, unless an unknown object cache drop-in is present.

* `wp redis disable`

Disables the Redis object cache. Default behavior is to delete the object cache drop-in, unless an unknown object cache drop-in is present.

* `wp redis update-dropin`

Updates the Redis object cache drop-in. Default behavior is to overwrite any existing object cache drop-in.
14 changes: 11 additions & 3 deletions includes/wp-cli-commands.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class RedisObjectCache_CLI_Commands extends WP_CLI_Command {

/**
* Show the Redis object cache status.
* Show the Redis object cache status and (when possible) client.
*
* ## EXAMPLES
*
Expand Down Expand Up @@ -42,6 +42,9 @@ public function status() {
/**
* Enables the Redis object cache.
*
* Default behavior is to create the object cache drop-in,
* unless an unknown object cache drop-in is present.
*
* ## EXAMPLES
*
* wp redis enable
Expand Down Expand Up @@ -76,7 +79,10 @@ public function enable() {
}

/**
* Disabled the Redis object cache.
* Disables the Redis object cache.
*
* Default behavior is to delete the object cache drop-in,
* unless an unknown object cache drop-in is present.
*
* ## EXAMPLES
*
Expand Down Expand Up @@ -116,7 +122,9 @@ public function disable() {
}

/**
* Updates the Redis object cache dropin.
* Updates the Redis object cache drop-in.
*
* Default behavior is to overwrite any existing object cache drop-in.
*
* ## EXAMPLES
*
Expand Down
25 changes: 25 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,31 @@ __Clustering via Client-side Sharding Example:__
] );


== WP-CLI Commands ==

To use the WP-CLI commands, make sure the plugin is activated:

wp plugin activate redis-cache

The following commands are supported:

* `wp redis status`

Show the Redis object cache status and (when possible) client.

* `wp redis enable`

Enables the Redis object cache. Default behavior is to create the object cache drop-in, unless an unknown object cache drop-in is present.

* `wp redis disable`

Disables the Redis object cache. Default behavior is to delete the object cache drop-in, unless an unknown object cache drop-in is present.

* `wp redis update-dropin`

Updates the Redis object cache drop-in. Default behavior is to overwrite any existing object cache drop-in.


== Screenshots ==

1. Plugin settings, connected to a single Redis server.
Expand Down

0 comments on commit d9ccee1

Please sign in to comment.