Skip to content

Commit a75974e

Browse files
Merge pull request #22 from DrewAPicture/issue/doc-verbs
Convert cache and transient help summaries to use third-person singular verbs.
2 parents 9b24d18 + c1e03ee commit a75974e

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

.github/settings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Used by Probot Settings: https://probot.github.io/apps/settings/
22
repository:
3-
description: Manage object and transient caches.
3+
description: Manages object and transient caches.
44
labels:
55
- name: bug
66
color: fc2929

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This package implements the following commands:
1313

1414
### wp cache
1515

16-
Manipulate the WP Object Cache object.
16+
Adds, removes, fetches, and flushes the WP Object Cache object.
1717

1818
~~~
1919
wp cache
@@ -40,7 +40,7 @@ for more detail.
4040

4141
### wp cache add
4242

43-
Add a value to the object cache.
43+
Adds a value to the object cache.
4444

4545
~~~
4646
wp cache add <key> <value> [<group>] [<expiration>]
@@ -79,7 +79,7 @@ be added.
7979

8080
### wp cache decr
8181

82-
Decrement a value in the object cache.
82+
Decrements a value in the object cache.
8383

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

115115
### wp cache delete
116116

117-
Remove a value from the object cache.
117+
Removes a value from the object cache.
118118

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

144144
### wp cache flush
145145

146-
Flush the object cache.
146+
Flushes the object cache.
147147

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

167167
### wp cache get
168168

169-
Get a value from the object cache.
169+
Gets a value from the object cache.
170170

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

196196
### wp cache incr
197197

198-
Increment a value in the object cache.
198+
Increments a value in the object cache.
199199

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

231231
### wp cache replace
232232

233-
Replace a value in the object cache, if the value already exists.
233+
Replaces a value in the object cache, if the value already exists.
234234

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

269269
### wp cache set
270270

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

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

328328
### wp transient
329329

330-
Manipulate the WordPress Transient Cache.
330+
Adds, gets, and deletes entries in the WordPress Transient Cache.
331331

332332
~~~
333333
wp transient
@@ -363,7 +363,7 @@ transient cache also uses the WordPress Object Cache.
363363

364364
### wp transient delete
365365

366-
Delete a transient value.
366+
Deletes a transient value.
367367

368368
~~~
369369
wp transient delete [<key>] [--network] [--all] [--expired]
@@ -401,7 +401,7 @@ wp transient delete [<key>] [--network] [--all] [--expired]
401401

402402
### wp transient get
403403

404-
Get a transient value.
404+
Gets a transient value.
405405

406406
~~~
407407
wp transient get <key> [--format=<format>] [--network]
@@ -438,7 +438,7 @@ wp transient get <key> [--format=<format>] [--network]
438438

439439
### wp transient set
440440

441-
Set a transient value.
441+
Sets a transient value.
442442

443443
~~~
444444
wp transient set <key> <value> [<expiration>] [--network]
@@ -469,7 +469,7 @@ wp transient set <key> <value> [<expiration>] [--network]
469469

470470
### wp transient type
471471

472-
Determine type of transients implementation.
472+
Determines the type of transients implementation.
473473

474474
~~~
475475
wp transient type

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wp-cli/cache-command",
3-
"description": "Manage object and transient caches.",
3+
"description": "Manages object and transient caches.",
44
"type": "wp-cli-package",
55
"homepage": "https://github.com/wp-cli/cache-command",
66
"support": {

src/Cache_Command.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

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

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

6969
/**
70-
* Decrement a value in the object cache.
70+
* Decrements a value in the object cache.
7171
*
7272
* Errors if the value can't be decremented.
7373
*
@@ -106,7 +106,7 @@ public function decr( $args, $assoc_args ) {
106106
}
107107

108108
/**
109-
* Remove a value from the object cache.
109+
* Removes a value from the object cache.
110110
*
111111
* Errors if the value can't be deleted.
112112
*
@@ -139,7 +139,7 @@ public function delete( $args, $assoc_args ) {
139139
}
140140

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

167167
/**
168-
* Get a value from the object cache.
168+
* Gets a value from the object cache.
169169
*
170170
* Errors if the value doesn't exist.
171171
*
@@ -198,7 +198,7 @@ public function get( $args, $assoc_args ) {
198198
}
199199

200200
/**
201-
* Increment a value in the object cache.
201+
* Increments a value in the object cache.
202202
*
203203
* Errors if the value can't be incremented.
204204
*
@@ -237,7 +237,7 @@ public function incr( $args, $assoc_args ) {
237237
}
238238

239239
/**
240-
* Replace a value in the object cache, if the value already exists.
240+
* Replaces a value in the object cache, if the value already exists.
241241
*
242242
* Errors if the value can't be replaced.
243243
*
@@ -279,7 +279,7 @@ public function replace( $args, $assoc_args ) {
279279
}
280280

281281
/**
282-
* Set a value to the object cache, regardless of whether it already exists.
282+
* Sets a value to the object cache, regardless of whether it already exists.
283283
*
284284
* Errors if the value can't be set.
285285
*

src/Transient_Command.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22

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

3434
/**
35-
* Get a transient value.
35+
* Gets a transient value.
3636
*
3737
* ## OPTIONS
3838
*
@@ -76,7 +76,7 @@ public function get( $args, $assoc_args ) {
7676
}
7777

7878
/**
79-
* Set a transient value.
79+
* Sets a transient value.
8080
*
8181
* `<expiration>` is the time until expiration, in seconds.
8282
*
@@ -113,7 +113,7 @@ public function set( $args, $assoc_args ) {
113113
}
114114

115115
/**
116-
* Delete a transient value.
116+
* Deletes a transient value.
117117
*
118118
* ## OPTIONS
119119
*
@@ -176,7 +176,7 @@ public function delete( $args, $assoc_args ) {
176176
}
177177

178178
/**
179-
* Determine type of transients implementation.
179+
* Determines the type of transients implementation.
180180
*
181181
* Indicates whether the transients API is using an object cache or the
182182
* options table.
@@ -198,7 +198,7 @@ public function type() {
198198
}
199199

200200
/**
201-
* Delete all expired transients.
201+
* Deletes all expired transients.
202202
*/
203203
private function delete_expired() {
204204
global $wpdb, $_wp_using_ext_object_cache;
@@ -225,7 +225,7 @@ private function delete_expired() {
225225
}
226226

227227
/**
228-
* Delete all transients.
228+
* Deletes all transients.
229229
*/
230230
private function delete_all() {
231231
global $wpdb, $_wp_using_ext_object_cache;

0 commit comments

Comments
 (0)