# ezcache/2.5.3/includes/Rest/PreloadController.php

ezCache, version 2.5.3. 37 lines.

- Page: https://pluginprobe.com/plugins/ezcache/2.5.3/code/includes/Rest/PreloadController.php
- Raw: https://pluginprobe.com/plugins/ezcache/2.5.3/raw/includes/Rest/PreloadController.php
- Modified: 2026-04-09T10:26:08+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/ezcache/2.5.3/code/includes/Rest/PreloadController.php#L10-L20`.

```php
<?php

namespace Upress\EzCache\Rest;

use Upress\EzCache\Preload;
use WP_REST_Request;

class PreloadController {

	/**
	 * Get the current state of the preload queue.
	 */
	public function show() {
		return wp_send_json_success( Preload::instance()->get_status() );
	}

	/**
	 * Start (or restart) the preload process.
	 *
	 * @param WP_REST_Request $request
	 */
	public function start( $request ) {
		$status = Preload::instance()->start();

		return wp_send_json_success( $status );
	}

	/**
	 * Cancel a running preload.
	 */
	public function destroy() {
		$status = Preload::instance()->stop();

		return wp_send_json_success( $status );
	}
}

```
