PluginProbe
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel / 0.3
FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel v0.3
1.7.1 1.7.0 1.6.0 1.5.2 trunk 0.1 0.2.0 0.2.1 0.3 0.3.1 0.3.2 0.3.3 0.3.4 0.4 0.4.1 0.4.2 0.4.3 1.0 1.1 1.2 1.3.1 1.4.0 1.4.1 1.5.0 1.5.1 All 26 releases
flywp / includes / Opcache.php

Opcache.php in FlyWP Helper – Page Cache, Page Optimization, Emails for FlyWP Server Control Panel 0.3, at includes/Opcache.php

43 lines 843 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FlyWP;
4
5 class Opcache {
6
7 public function clear() {
8 return opcache_reset();
9 }
10
11 public function has_opcache() {
12 return function_exists( 'opcache_get_status' );
13 }
14
15 public function get_status() {
16 return opcache_get_status();
17 }
18
19 public function get_config() {
20 return opcache_get_configuration();
21 }
22
23 public function enabled() {
24 if ( ! $this->has_opcache() ) {
25 return false;
26 }
27
28 $status = $this->get_status();
29
30 return $status['opcache_enabled'] === true;
31 }
32
33 public function purge_cache_url() {
34 return wp_nonce_url(
35 add_query_arg(
36 [ 'flywp-action' => 'purge-opcache' ],
37 flywp()->admin->page_url()
38 ),
39 'fly-opcache-purge'
40 );
41 }
42 }
43