# wp-optimize/4.5.3/cache/file-based-page-cache.php

WP-Optimize – Cache, Compress images, Minify &amp; Clean database to boost page speed &amp; performance, version 4.5.3. 25 lines.

- Page: https://pluginprobe.com/plugins/wp-optimize/4.5.3/code/cache/file-based-page-cache.php
- Raw: https://pluginprobe.com/plugins/wp-optimize/4.5.3/raw/cache/file-based-page-cache.php
- Modified: 2025-05-01T10:24:58+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/wp-optimize/4.5.3/code/cache/file-based-page-cache.php#L10-L20`.

```php
<?php

if (!defined('ABSPATH')) die('No direct access allowed');

/**
 * File based page cache drop in
 */
require_once(dirname(__FILE__) . '/file-based-page-cache-functions.php');

if (!defined('WPO_CACHE_DIR')) define('WPO_CACHE_DIR', untrailingslashit(WP_CONTENT_DIR) . '/wpo-cache');

/**
 * Load extensions.
 */
wpo_cache_load_extensions();

/**
 * Action triggered when the cache extensions are all loaded. Allows to execute code depending on an other extension, without knowing the order in which the files are loaded.
 */
do_action('wpo_cache_extensions_loaded');

if (true === wpo_can_serve_from_cache()) {
	wpo_serve_cache();
}

```
