# Search Cache CLI

#### Command synopsis

```
wp asp cache <clear|purge|info>
```

To get all the parameters and flags directly in the command line run:

<pre><code><strong>wp help asp cache
</strong></code></pre>

#### Getting information about the cache

To display verbose information about the search cache run:

```
wp asp cache info
```

This will output cache hit/miss statistics and the total number of cached items.

#### Removing expired items from the cache

To clear the cache (aka. remove expired records), run the following command:

```
wp asp cache clear
```

This command will only delete items, which have been expired from the cache storage.

#### Removing all items from the cache (purge)

To purge the cache, run this command:

```
wp asp cache purge
```

This command will remove all items from cache, regardless of their expiration.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://knowledgebase.ajaxsearchpro.com/api/wp-cli-commands/search-cache-cli.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
