Cache_Command
Manage the Top 10 transient output cache.
EXAMPLES
# Flush all Top 10 cache entries
$ wp top10 cache flush --force
# Show cache status
$ wp top10 cache status
Namespace: WebberZone\Top_Ten\Pro\CLI
Since: 4.3.0
Source: includes/cli/class-cache-command.php line 31
Extends: Base_Command
Methods
flush()
Flush all Top 10 cache entries.
OPTIONS
[—force] : Skip interactive confirmation.
[—dry-run] : Show how many entries would be flushed without making changes.
[—network] : Flush cache for all sites in the network.
[—blog-id=
EXAMPLES
wp top10 cache flush
wp top10 cache flush --force
wp top10 cache flush --dry-run
wp top10 cache flush --network
Line: 60
public function flush( array $args, array $assoc_args ): void;
| Type | Name | Description |
|---|---|---|
array | $args | Command arguments. |
array | $assoc_args | Command associative arguments. |
Returns: void
enable()
Enable the Top 10 output cache.
OPTIONS
[—dry-run] : Show what would change without making changes.
[—network] : Enable cache for all sites in the network.
[—blog-id=
EXAMPLES
wp top10 cache enable
wp top10 cache enable --network
wp top10 cache enable --dry-run
Line: 110
public function enable( array $args, array $assoc_args ): void;
| Type | Name | Description |
|---|---|---|
array | $args | Command arguments. |
array | $assoc_args | Command associative arguments. |
Returns: void
disable()
Disable the Top 10 output cache.
OPTIONS
[—dry-run] : Show what would change without making changes.
[—network] : Disable cache for all sites in the network.
[—blog-id=
EXAMPLES
wp top10 cache disable
wp top10 cache disable --network
wp top10 cache disable --dry-run
Line: 141
public function disable( array $args, array $assoc_args ): void;
| Type | Name | Description |
|---|---|---|
array | $args | Command arguments. |
array | $assoc_args | Command associative arguments. |
Returns: void
status()
Show cache status: enabled flag, cache_time setting, and active entry count.
OPTIONS
[—format=
[—network] : Show cache status for all sites in the network.
[—blog-id=
EXAMPLES
wp top10 cache status
wp top10 cache status --format=json
Line: 190
public function status( array $args, array $assoc_args ): void;
| Type | Name | Description |
|---|---|---|
array | $args | Command arguments. |
array | $assoc_args | Command associative arguments. |
Returns: void