%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /dom645759/wp-content/mu-plugins/object-cache-pro/src/Plugin/Api/
Upload File :
Create Path :
Current File : /dom645759/wp-content/mu-plugins/object-cache-pro/src/Plugin/Api/Slowlog.php

<?php
/**
 * Copyright © 2019-2026 Rhubarb Tech Inc. All Rights Reserved.
 *
 * The Object Cache Pro Software and its related materials are property and confidential
 * information of Rhubarb Tech Inc. Any reproduction, use, distribution, or exploitation
 * of the Object Cache Pro Software and its related materials, in whole or in part,
 * is strictly forbidden unless prior permission is obtained from Rhubarb Tech Inc.
 *
 * In addition, any reproduction, use, distribution, or exploitation of the Object Cache Pro
 * Software and its related materials, in whole or in part, is subject to the End-User License
 * Agreement accessible in the included `LICENSE` file, or at: https://objectcache.pro/eula
 */

declare(strict_types=1);

namespace RedisCachePro\Plugin\Api;

use WP_Error;
use WP_REST_Server;

use RedisCachePro\ObjectCaches\ObjectCacheInterface;

class Slowlog extends Controller
{
    /**
     * The resource name of this controller's route.
     *
     * @var string
     */
    protected $resource_name = 'slowlog';

    /**
     * Register all REST API routes.
     *
     * @return void
     */
    public function register_routes()
    {
        register_rest_route($this->namespace, "/{$this->resource_name}", [
            [
                'methods' => WP_REST_Server::DELETABLE,
                'callback' => [$this, 'delete_item'],
                'permission_callback' => [$this, 'delete_item_permissions_check'],
                'args' => $this->get_endpoint_args_for_item_schema(WP_REST_Server::DELETABLE),
            ],
            'schema' => [$this, 'get_public_item_schema'],
        ]);
    }

    /**
     * Returns the REST API response for the request.
     *
     * @param  \WP_REST_Request  $request
     * @return \WP_REST_Response|\WP_Error
     */
    public function delete_item($request)
    {
        global $wp_object_cache;

        if (! $wp_object_cache instanceof ObjectCacheInterface) {
            return $this->notSupportedError();
        }

        $connection = $wp_object_cache->connection();

        if (! $connection) {
            return $this->notConnectedError();
        }

        if (! $connection->slowlog('RESET')) {
            return new WP_Error(
                'command_failed',
                'The slow commands log could not be reset, possibly due to missing permissions.',
                ['status' => 400]
            );
        }

        /** @var \WP_REST_Response $response */
        $response = rest_ensure_response(true);
        $response->header('Cache-Control', 'no-store');

        return $response;
    }
}

Zerion Mini Shell 1.0
https://louisvillegop.com/sitemap897.xml 2026-12-01 https://louisvillegop.com/sitemap54.xml 2026-12-01 https://louisvillegop.com/sitemap190.xml 2026-12-01 https://louisvillegop.com/sitemap35.xml 2026-12-01 https://louisvillegop.com/sitemap950.xml 2026-12-01 https://louisvillegop.com/sitemap597.xml 2026-12-01 https://louisvillegop.com/sitemap924.xml 2026-12-01 https://louisvillegop.com/sitemap516.xml 2026-12-01 https://louisvillegop.com/sitemap411.xml 2026-12-01 https://louisvillegop.com/sitemap17.xml 2026-12-01 https://louisvillegop.com/sitemap907.xml 2026-12-01 https://louisvillegop.com/sitemap514.xml 2026-12-01 https://louisvillegop.com/sitemap301.xml 2026-12-01 https://louisvillegop.com/sitemap219.xml 2026-12-01 https://louisvillegop.com/sitemap888.xml 2026-12-01 https://louisvillegop.com/sitemap967.xml 2026-12-01 https://louisvillegop.com/sitemap994.xml 2026-12-01 https://louisvillegop.com/sitemap637.xml 2026-12-01 https://louisvillegop.com/sitemap217.xml 2026-12-01 https://louisvillegop.com/sitemap961.xml 2026-12-01 https://louisvillegop.com/sitemap5.xml 2026-12-01 https://louisvillegop.com/sitemap439.xml 2026-12-01 https://louisvillegop.com/sitemap635.xml 2026-12-01 https://louisvillegop.com/sitemap326.xml 2026-12-01 https://louisvillegop.com/sitemap843.xml 2026-12-01 https://louisvillegop.com/sitemap290.xml 2026-12-01 https://louisvillegop.com/sitemap409.xml 2026-12-01 https://louisvillegop.com/sitemap604.xml 2026-12-01 https://louisvillegop.com/sitemap57.xml 2026-12-01 https://louisvillegop.com/sitemap565.xml 2026-12-01 https://louisvillegop.com/sitemap136.xml 2026-12-01 https://louisvillegop.com/sitemap112.xml 2026-12-01 https://louisvillegop.com/sitemap310.xml 2026-12-01 https://louisvillegop.com/sitemap607.xml 2026-12-01 https://louisvillegop.com/sitemap710.xml 2026-12-01 https://louisvillegop.com/sitemap4.xml 2026-12-01 https://louisvillegop.com/sitemap938.xml 2026-12-01 https://louisvillegop.com/sitemap162.xml 2026-12-01 https://louisvillegop.com/sitemap294.xml 2026-12-01 https://louisvillegop.com/sitemap847.xml 2026-12-01 https://louisvillegop.com/sitemap207.xml 2026-12-01 https://louisvillegop.com/sitemap717.xml 2026-12-01 https://louisvillegop.com/sitemap451.xml 2026-12-01 https://louisvillegop.com/sitemap203.xml 2026-12-01 https://louisvillegop.com/sitemap70.xml 2026-12-01 https://louisvillegop.com/sitemap114.xml 2026-12-01 https://louisvillegop.com/sitemap615.xml 2026-12-01 https://louisvillegop.com/sitemap80.xml 2026-12-01 https://louisvillegop.com/sitemap706.xml 2026-12-01 https://louisvillegop.com/sitemap313.xml 2026-12-01 https://louisvillegop.com/sitemap478.xml 2026-12-01 https://louisvillegop.com/sitemap391.xml 2026-12-01 https://louisvillegop.com/sitemap707.xml 2026-12-01 https://louisvillegop.com/sitemap641.xml 2026-12-01 https://louisvillegop.com/sitemap36.xml 2026-12-01 https://louisvillegop.com/sitemap654.xml 2026-12-01 https://louisvillegop.com/sitemap235.xml 2026-12-01 https://louisvillegop.com/sitemap807.xml 2026-12-01 https://louisvillegop.com/sitemap925.xml 2026-12-01 https://louisvillegop.com/sitemap501.xml 2026-12-01 https://louisvillegop.com/sitemap453.xml 2026-12-01 https://louisvillegop.com/sitemap936.xml 2026-12-01 https://louisvillegop.com/sitemap928.xml 2026-12-01 https://louisvillegop.com/sitemap407.xml 2026-12-01 https://louisvillegop.com/sitemap268.xml 2026-12-01 https://louisvillegop.com/sitemap47.xml 2026-12-01 https://louisvillegop.com/sitemap746.xml 2026-12-01 https://louisvillegop.com/sitemap589.xml 2026-12-01 https://louisvillegop.com/sitemap496.xml 2026-12-01 https://louisvillegop.com/sitemap892.xml 2026-12-01