Skip to content

Utilities ​

Type
Class
Namespace
craft\mcp\capabilities
Inherits
craft\mcp\capabilities\Utilities
Since
5.12.0

The everyday tasks of the Caches and Queue Manager utilities.

View source

Public Methods ​

MethodDescription
clearCaches()
listCaches()
queueStatus()
releaseAllJobs()
retryAllJobs()
runQueue()

clearCaches() ​

View source

Arguments ​

  • $caches (list<string>, null) – Keys from caches.list. Omit to clear every cache.

Returns ​

array{cleared: list<string>}

listCaches() ​

View source

Returns ​

array{caches: list<array{key: string, label: string, info: string|null}>}

queueStatus() ​

View source

Arguments ​

  • $limit (integer) – The most jobs to list.

Returns ​

array{total: int, jobs: list<array<string,mixed>>}

releaseAllJobs() ​

View source

Returns ​

array{released: true}

retryAllJobs() ​

View source

Returns ​

array{retried: true}

runQueue() ​

View source

Arguments ​

  • $maxSeconds (integer) – How long to keep starting jobs before returning. Jobs that haven’t run stay queued.

Returns ​

array{ran: int, remaining: int}