<?php

/**
 * JCOGS Image Pro - Cache Locations Data Route
 * ============================================
 * CP-scoped JSON endpoint for cache locations table HTML.
 */

namespace JCOGSDesign\JCOGSImagePro\ControlPanel\Routes\Caching;

use JCOGSDesign\JCOGSImagePro\Actions\CacheAjaxEndpoints;
use JCOGSDesign\JCOGSImagePro\ControlPanel\Routes\ImageAbstractRoute;

class CacheLocationsData extends ImageAbstractRoute
{
    /**
     * @var string
     */
    protected $route_path = 'caching/cache_locations_data';

    /**
     * Proxy to shared cache AJAX handler under CP context.
     *
     * @param mixed $id
     * @return $this
     */
    public function process($id = false)
    {
        $action = new CacheAjaxEndpoints();
        $action->cache_locations();

        return $this;
    }
}
