admin.php
1 year ago
helpers.php
1 year ago
issues.php
2 years ago
news.php
3 years ago
ratings.php
1 year ago
releases.txt
2 years ago
rest.php
2 years ago
issues.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | if ( !class_exists( 'MeowCommon_Issues' ) ) { |
| 4 | |
| 5 | class MeowCommon_Issues { |
| 6 | |
| 7 | public function __construct( $prefix, $mainfile, $domain ) { |
| 8 | $this->check_plugins(); |
| 9 | } |
| 10 | |
| 11 | function check_plugins() { |
| 12 | |
| 13 | // Previous technique to disable caching on the REST API. |
| 14 | // if ( class_exists( 'LiteSpeed\Core' ) ) { |
| 15 | // $this->check_litespeed(); |
| 16 | // } |
| 17 | |
| 18 | // Recommended technique to disable caching on the REST API by the Litespeed team. |
| 19 | if ( defined( 'LSCWP_V' ) ) { |
| 20 | do_action( 'litespeed_control_set_nocache', 'Meow Apps API must not be cached.' ); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | function check_litespeed() { |
| 25 | // By default, the REST API is cached by Litespeed. Why is that? |
| 26 | // It is absolutely not a good idea, especially on the admin side. |
| 27 | $cache_rest = get_option( 'litespeed.conf.cache-rest' ); |
| 28 | if ( $cache_rest ) { |
| 29 | update_option( 'litespeed.conf.cache-rest', 0 ); |
| 30 | } |
| 31 | } |
| 32 | |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | ?> |