library/Helper/Cache.php
public function stop()
    {
        if (!$this->isActive() || $this->hasCache()) {
            return false;
        }

        // Get output buffer and save to cache
        $return_data = ob_get_clean();

        if (!empty($return_data)) {
            $cacheArray = (array) wp_cache_get($this->postId, self::getKeyGroup());

            $cacheArray[$this->hash] = $return_data.$this->fragmentTag();

            wp_cache_delete($this->postId, self::getKeyGroup());

            wp_cache_add($this->postId, array_filter($cacheArray), self::getKeyGroup(), $this->ttl);
        }

        echo $return_data;
        return true;
    }
public function stop()
    {
        if (!$this->isActive() || $this->hasCache()) {
            return false;
        }

        // Get output buffer and save to cache
        $return_data = ob_get_clean();

        if (!empty($return_data)) {
            $cacheArray = (array) wp_cache_get($this->postId, self::getKeyGroup());

            $cacheArray[$this->hash] = $return_data.$this->fragmentTag();

            wp_cache_delete($this->postId, self::getKeyGroup());

            wp_cache_add($this->postId, array_filter($cacheArray), self::getKeyGroup(), $this->ttl);
        }

        echo $return_data;
        return true;
    }
public function stop ( ) { if ( ! $ this -> isActive ( ) || $ this -> hasCache ( ) ) { return false ; } // Get output buffer and save to cache $ return_data = ob_get_clean ( ) ; if ( ! empty ( $ return_data ) ) { $ cacheArray = ( array ) wp_cache_get ( $ this -> postId , self :: getKeyGroup ( ) ) ; $ cacheArray [ $ this -> hash ] = $ return_data . $ this -> fragmentTag ( ) ; wp_cache_delete ( $ this -> postId , self :: getKeyGroup ( ) ) ; wp_cache_add ( $ this -> postId , array_filter ( $ cacheArray ) , self :: getKeyGroup ( ) , $ this -> ttl ) ; } echo $ return_data ; return true ; }
Stops the cache engine and saves the output buffer to the cache
@return boolean
Stops the cache engine and saves the output buffer to the cache