litespeed_purge_all with REST API
-
I want to setup a REST endpoint to purge everything.
I’m trying this inside of
functions.php
, but it does not seem to work.
It does seem to get something because after I login to the backend it seems to have cleared it, but not before.... register_rest_route( 'ppt/v1', '/purge', array( 'methods' => 'GET', 'callback' => 'purge_cache', )); }); function purge_cache(){ do_action('litespeed_purge_all'); return array('status' => 'success'); }
I saw in other threads that something like
wp-load.php
was imported, could that be related to the issue?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘litespeed_purge_all with REST API’ is closed to new replies.