src/services/HtmlcacheService.php
private function isElementApiRoute()
    {
        $plugin = \Craft::$app->getPlugins()->getPlugin('element-api');
        if ($plugin) {
            $elementApiRoutes = $plugin->getSettings()->endpoints;
            $routes = array_keys($elementApiRoutes);
            foreach ($routes as $route) {
                // form the correct expression
                $route = preg_replace('~\<.*?:(.*?)\>~', '$1', $route);
                $found = preg_match('~' . $route . '~', $this->uri);
                if ($found) {
                    return true;
                }
            }
        }
        return false;
    }
private function isElementApiRoute()
    {
        $plugin = \Craft::$app->getPlugins()->getPlugin('element-api');
        if ($plugin) {
            $elementApiRoutes = $plugin->getSettings()->endpoints;
            $routes = array_keys($elementApiRoutes);
            foreach ($routes as $route) {
                // form the correct expression
                $route = preg_replace('~\<.*?:(.*?)\>~', '$1', $route);
                $found = preg_match('~' . $route . '~', $this->uri);
                if ($found) {
                    return true;
                }
            }
        }
        return false;
    }
private function isElementApiRoute ( ) { $ plugin = \ Craft :: $ app -> getPlugins ( ) -> getPlugin ( 'element-api' ) ; if ( $ plugin ) { $ elementApiRoutes = $ plugin -> getSettings ( ) -> endpoints ; $ routes = array_keys ( $ elementApiRoutes ) ; foreach ( $ routes as $ route ) { // form the correct expression
 $ route = preg_replace ( '~\<.*?:(.*?)\>~' , '$1' , $ route ) ; $ found = preg_match ( '~' . $ route . '~' , $ this -> uri ) ; if ( $ found ) { return true ; } } } return false ; }
Check if route is from element api

@return boolean
Check if route is from element api