# searchpro/1.9.4/inc/thirdparty/plugin/NginxHelper.php

BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS &amp; JavaScript, version 1.9.4. 19 lines.

- Page: https://pluginprobe.com/plugins/searchpro/1.9.4/code/inc/thirdparty/plugin/NginxHelper.php
- Raw: https://pluginprobe.com/plugins/searchpro/1.9.4/raw/inc/thirdparty/plugin/NginxHelper.php
- Modified: 2024-08-21T14:56:30+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/searchpro/1.9.4/code/inc/thirdparty/plugin/NginxHelper.php#L10-L20`.

```php
<?php
if (!defined('ABSPATH')) exit;

class NginxHelper extends berqIntegrations {
    function __construct() {
        add_action('berqwp_flush_all_cache', [$this, 'flush_cache']);
        add_action('berqwp_stored_page_cache', [$this, 'flush_cache']);
        add_action('berqwp_flush_page_cache', [$this, 'flush_cache']);
    }

    function flush_cache()
    {
        if (class_exists('Nginx_Helper')) {
            do_action('rt_nginx_helper_purge_all');
        }
    }
}

new NginxHelper();
```
