Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/settings.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Used by Probot Settings: https://probot.github.io/apps/settings/
repository:
description: Manage object and transient caches.
description: Manages object and transient caches.
labels:
- name: bug
color: fc2929
Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ This package implements the following commands:

### wp cache

Manipulate the WP Object Cache object.
Adds, removes, fetches, and flushes the WP Object Cache object.

~~~
wp cache
Expand All @@ -40,7 +40,7 @@ for more detail.

### wp cache add

Add a value to the object cache.
Adds a value to the object cache.

~~~
wp cache add <key> <value> [<group>] [<expiration>]
Expand Down Expand Up @@ -79,7 +79,7 @@ be added.

### wp cache decr

Decrement a value in the object cache.
Decrements a value in the object cache.

~~~
wp cache decr <key> [<offset>] [<group>]
Expand Down Expand Up @@ -114,7 +114,7 @@ Errors if the value can't be decremented.

### wp cache delete

Remove a value from the object cache.
Removes a value from the object cache.

~~~
wp cache delete <key> [<group>]
Expand Down Expand Up @@ -143,7 +143,7 @@ Errors if the value can't be deleted.

### wp cache flush

Flush the object cache.
Flushes the object cache.

~~~
wp cache flush
Expand All @@ -166,7 +166,7 @@ Errors if the object cache can't be flushed.

### wp cache get

Get a value from the object cache.
Gets a value from the object cache.

~~~
wp cache get <key> [<group>]
Expand Down Expand Up @@ -195,7 +195,7 @@ Errors if the value doesn't exist.

### wp cache incr

Increment a value in the object cache.
Increments a value in the object cache.

~~~
wp cache incr <key> [<offset>] [<group>]
Expand Down Expand Up @@ -230,7 +230,7 @@ Errors if the value can't be incremented.

### wp cache replace

Replace a value in the object cache, if the value already exists.
Replaces a value in the object cache, if the value already exists.

~~~
wp cache replace <key> <value> [<group>] [<expiration>]
Expand Down Expand Up @@ -268,7 +268,7 @@ Errors if the value can't be replaced.

### wp cache set

Set a value to the object cache, regardless of whether it already exists.
Sets a value to the object cache, regardless of whether it already exists.

~~~
wp cache set <key> <value> [<group>] [<expiration>]
Expand Down Expand Up @@ -327,7 +327,7 @@ ability to determine which object cache is being used.

### wp transient

Manipulate the WordPress Transient Cache.
Adds, gets, and deletes entries in the WordPress Transient Cache.

~~~
wp transient
Expand Down Expand Up @@ -363,7 +363,7 @@ transient cache also uses the WordPress Object Cache.

### wp transient delete

Delete a transient value.
Deletes a transient value.

~~~
wp transient delete [<key>] [--network] [--all] [--expired]
Expand Down Expand Up @@ -401,7 +401,7 @@ wp transient delete [<key>] [--network] [--all] [--expired]

### wp transient get

Get a transient value.
Gets a transient value.

~~~
wp transient get <key> [--format=<format>] [--network]
Expand Down Expand Up @@ -438,7 +438,7 @@ wp transient get <key> [--format=<format>] [--network]

### wp transient set

Set a transient value.
Sets a transient value.

~~~
wp transient set <key> <value> [<expiration>] [--network]
Expand Down Expand Up @@ -469,7 +469,7 @@ wp transient set <key> <value> [<expiration>] [--network]

### wp transient type

Determine type of transients implementation.
Determines the type of transients implementation.

~~~
wp transient type
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "wp-cli/cache-command",
"description": "Manage object and transient caches.",
"description": "Manages object and transient caches.",
"type": "wp-cli-package",
"homepage": "https://github.com/wp-cli/cache-command",
"support": {
Expand Down
18 changes: 9 additions & 9 deletions src/Cache_Command.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Manipulate the WP Object Cache object.
* Adds, removes, fetches, and flushes the WP Object Cache object.
*
* By default, the WP Object Cache exists in PHP memory for the length of the
* request (and is emptied at the end). Use a persistent object cache drop-in
Expand All @@ -25,7 +25,7 @@
class Cache_Command extends WP_CLI_Command {

/**
* Add a value to the object cache.
* Adds a value to the object cache.
*
* Errors if a value already exists for the key, which means the value can't
* be added.
Expand Down Expand Up @@ -67,7 +67,7 @@ public function add( $args, $assoc_args ) {
}

/**
* Decrement a value in the object cache.
* Decrements a value in the object cache.
*
* Errors if the value can't be decremented.
*
Expand Down Expand Up @@ -106,7 +106,7 @@ public function decr( $args, $assoc_args ) {
}

/**
* Remove a value from the object cache.
* Removes a value from the object cache.
*
* Errors if the value can't be deleted.
*
Expand Down Expand Up @@ -139,7 +139,7 @@ public function delete( $args, $assoc_args ) {
}

/**
* Flush the object cache.
* Flushes the object cache.
*
* For WordPress multisite instances using a persistent object cache,
* flushing the object cache will typically flush the cache for all sites.
Expand All @@ -165,7 +165,7 @@ public function flush( $args, $assoc_args ) {
}

/**
* Get a value from the object cache.
* Gets a value from the object cache.
*
* Errors if the value doesn't exist.
*
Expand Down Expand Up @@ -198,7 +198,7 @@ public function get( $args, $assoc_args ) {
}

/**
* Increment a value in the object cache.
* Increments a value in the object cache.
*
* Errors if the value can't be incremented.
*
Expand Down Expand Up @@ -237,7 +237,7 @@ public function incr( $args, $assoc_args ) {
}

/**
* Replace a value in the object cache, if the value already exists.
* Replaces a value in the object cache, if the value already exists.
*
* Errors if the value can't be replaced.
*
Expand Down Expand Up @@ -279,7 +279,7 @@ public function replace( $args, $assoc_args ) {
}

/**
* Set a value to the object cache, regardless of whether it already exists.
* Sets a value to the object cache, regardless of whether it already exists.
*
* Errors if the value can't be set.
*
Expand Down
14 changes: 7 additions & 7 deletions src/Transient_Command.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/**
* Manipulate the WordPress Transient Cache.
* Adds, gets, and deletes entries in the WordPress Transient Cache.
*
* By default, the transient cache uses the WordPress database to persist values
* between requests. When a persistent object cache drop-in is installed, the
Expand Down Expand Up @@ -32,7 +32,7 @@
class Transient_Command extends WP_CLI_Command {

/**
* Get a transient value.
* Gets a transient value.
*
* ## OPTIONS
*
Expand Down Expand Up @@ -76,7 +76,7 @@ public function get( $args, $assoc_args ) {
}

/**
* Set a transient value.
* Sets a transient value.
*
* `<expiration>` is the time until expiration, in seconds.
*
Expand Down Expand Up @@ -113,7 +113,7 @@ public function set( $args, $assoc_args ) {
}

/**
* Delete a transient value.
* Deletes a transient value.
*
* ## OPTIONS
*
Expand Down Expand Up @@ -176,7 +176,7 @@ public function delete( $args, $assoc_args ) {
}

/**
* Determine type of transients implementation.
* Determines the type of transients implementation.
*
* Indicates whether the transients API is using an object cache or the
* options table.
Expand All @@ -198,7 +198,7 @@ public function type() {
}

/**
* Delete all expired transients.
* Deletes all expired transients.
*/
private function delete_expired() {
global $wpdb, $_wp_using_ext_object_cache;
Expand All @@ -225,7 +225,7 @@ private function delete_expired() {
}

/**
* Delete all transients.
* Deletes all transients.
*/
private function delete_all() {
global $wpdb, $_wp_using_ext_object_cache;
Expand Down