# flywp/0.3.1/includes/Opcache.php

FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel, version 0.3.1. 43 lines.

- Page: https://pluginprobe.com/plugins/flywp/0.3.1/code/includes/Opcache.php
- Raw: https://pluginprobe.com/plugins/flywp/0.3.1/raw/includes/Opcache.php
- Modified: 2023-06-16T09:04:10+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/flywp/0.3.1/code/includes/Opcache.php#L10-L20`.

```php
<?php

namespace FlyWP;

class Opcache {

    public function clear() {
        return opcache_reset();
    }

    public function has_opcache() {
        return function_exists( 'opcache_get_status' );
    }

    public function get_status() {
        return opcache_get_status();
    }

    public function get_config() {
        return opcache_get_configuration();
    }

    public function enabled() {
        if ( ! $this->has_opcache() ) {
            return false;
        }

        $status = $this->get_status();

        return $status['opcache_enabled'] === true;
    }

    public function purge_cache_url() {
        return wp_nonce_url(
            add_query_arg(
                [ 'flywp-action' => 'purge-opcache' ],
                flywp()->admin->page_url()
            ),
            'fly-opcache-purge'
        );
    }
}

```
