# searchpro/4.0.30/inc/thirdparty/plugin/ObjectCachePro.php

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

- Page: https://pluginprobe.com/plugins/searchpro/4.0.30/code/inc/thirdparty/plugin/ObjectCachePro.php
- Raw: https://pluginprobe.com/plugins/searchpro/4.0.30/raw/inc/thirdparty/plugin/ObjectCachePro.php
- Modified: 2026-07-01T14:04:48+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/4.0.30/code/inc/thirdparty/plugin/ObjectCachePro.php#L10-L20`.

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

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

    function flush_cache()
    {
        if (function_exists('wp_cache_flush')) {
            wp_cache_flush(); // Clear the entire object cache.
        }
    }

    function flush_page_cache($slug)
    {
        if (function_exists('wp_cache_flush')) {
            wp_cache_flush(); // Object cache has no per-URL concept; flush all on page store.
        }
    }
}

new ObjectCachePro();

```
