Recent

Cache_Command class Pro only

Cache_Command

Cache management commands for Better Search.

Namespace: WebberZone\Better_Search\Pro\CLI
Since: 4.3.0
Source: includes/cli/class-cache-command.php line 24 Extends: Base_Command

Methods

clear()

Clear Better Search cache.

OPTIONS

[—network] : Clear cache for all sites in the network.

[—force] : Force cache clear without confirmation.

[—dry-run] : Show how many entries would be cleared without making changes.

[—verbose] : Show detailed output.

EXAMPLES

wp bsearch cache clear
wp bsearch cache clear --network
wp bsearch cache clear --force
wp bsearch cache clear --dry-run

Line: 53

public function clear( array $args, array $assoc_args ): void;
TypeNameDescription
array$argsCommand arguments.
array$assoc_argsCommand associative arguments.

Returns: void

warm()

Warm cache by pre-generating search results.

OPTIONS

[—limit=] : Number of top searches to warm. Default: 50

[—dry-run] : Show what would be warmed without making changes.

[—force] : Force cache warming even if cache exists.

[—verbose] : Show which queries were skipped (no results or already cached).

EXAMPLES

wp bsearch cache warm
wp bsearch cache warm --limit=100
wp bsearch cache warm --dry-run

Line: 116

public function warm( array $args, array $assoc_args ): void;
TypeNameDescription
array$argsCommand arguments.
array$assoc_argsCommand associative arguments.

Returns: void

status()

Show cache status.

OPTIONS

[—format=] : Output format (table, json, csv). Default: table.

[—url=] : Specific site URL to show cache status for (multisite only).

[—network] : Show cache status for all sites in the network.

[—blog-id=] : Specific blog ID to show cache status for (multisite only).

EXAMPLES

wp bsearch cache status
wp bsearch cache status --format=json
wp bsearch cache status --network
wp bsearch cache status --blog-id=2

Line: 243

public function status( array $args, array $assoc_args ): void;
TypeNameDescription
array$argsCommand arguments.
array$assoc_argsCommand associative arguments.

Returns: void