cls( 'Admin_Display' ), 'enroll' ], 10, 4 );
add_action( 'litespeed_build_switch', [ $this->cls( 'Admin_Display' ), 'build_switch' ] );
// Action `litespeed_settings_content`
// Action `litespeed_settings_tab`
}
/**
* Disable All
*
* Disables all LiteSpeed Cache features with a given reason.
*
* @since 2.9.7.2
* @access public
* @param string $reason The reason for disabling all features.
*/
public function disable_all( $reason ) {
do_action( 'litespeed_debug', '[API] Disabled_all due to ' . $reason );
! defined( 'LITESPEED_DISABLE_ALL' ) && define( 'LITESPEED_DISABLE_ALL', true );
}
/**
* Append commenter vary
*
* Adds commenter vary to the cache vary cookies.
*
* @since 3.0
* @access public
*/
public static function vary_append_commenter() {
Vary::cls()->append_commenter();
}
/**
* Check if is from Cloud
*
* Checks if the current request originates from QUIC.cloud.
*
* @since 4.2
* @access public
* @return bool True if from QUIC.cloud, false otherwise.
*/
public function is_from_cloud() {
return $this->cls( 'Cloud' )->is_from_cloud();
}
/**
* Purge post
*
* Purges the cache for a specific post.
*
* @since 3.0
* @access public
* @param int $pid Post ID to purge.
*/
public function purge_post( $pid ) {
$this->cls( 'Purge' )->purge_post( $pid );
}
/**
* Purge URL
*
* Purges the cache for a specific URL.
*
* @since 3.0
* @access public
* @param string $url URL to purge.
*/
public function purge_url( $url ) {
$this->cls( 'Purge' )->purge_url( $url );
}
/**
* Set cacheable
*
* Marks the current request as cacheable.
*
* @since 3.0
* @access public
* @param string|bool $reason Optional reason for setting cacheable.
*/
public function set_cacheable( $reason = false ) {
$this->cls( 'Control' )->set_cacheable( $reason );
}
/**
* Check ESI enabled
*
* Returns whether ESI is enabled.
*
* @since 3.0
* @access public
* @return bool True if ESI is enabled, false otherwise.
*/
public function esi_enabled() {
return $this->cls( 'Router' )->esi_enabled();
}
/**
* Get TTL
*
* Retrieves the cache TTL (time to live).
*
* @since 3.0
* @access public
* @return int Cache TTL value.
*/
public function get_ttl() {
return $this->cls( 'Control' )->get_ttl();
}
/**
* Generate ESI block URL
*
* Generates a URL for an ESI block.
*
* @since 3.0
* @access public
* @param string $block_id ESI block ID.
* @param string $wrapper Wrapper identifier.
* @param array $params Parameters for the ESI block.
* @param string $control Cache control settings.
* @param bool $silence Silence output flag.
* @param bool $preserved Preserved flag.
* @param bool $svar Server variable flag.
* @param array $inline_param Inline parameters.
* @return string ESI block URL.
*/
public function sub_esi_block(
$block_id,
$wrapper,
$params = [],
$control = 'private,no-vary',
$silence = false,
$preserved = false,
$svar = false,
$inline_param = []
) {
return $this->cls( 'ESI' )->sub_esi_block( $block_id, $wrapper, $params, $control, $silence, $preserved, $svar, $inline_param );
}
/**
* Set and sync conf
*
* Updates and synchronizes configuration settings.
*
* @since 7.2
* @access public
* @param bool|array $the_matrix Configuration data to update.
*/
public function save_conf( $the_matrix = false ) {
$this->cls( 'Conf' )->update_confs( $the_matrix );
}
}