array( 'type' => 'array' ), 'purge_targets' => array( 'type' => 'array' ), ); } protected function annotations(): array { return array( 'readonly' => true, 'destructive' => false, 'idempotent' => true, ); } /** * @param array $input Input. * @return array */ protected function run( array $input ) { $rows = array(); foreach ( array( 'cache-general', 'cache-scope', 'cache-ttl', 'browser', 'object-cache', 'guest' ) as $area ) { $rows = array_merge( $rows, Settings_Repository::describe_area( $area ) ); } $targets = array(); foreach ( Purge_Repository::targets() as $target => $describes ) { $targets[] = array( 'target' => $target, 'describes' => $describes, ); } return array( 'status' => $rows, 'purge_targets' => $targets, 'message' => Settings_Repository::value( 'cache' ) ? __( 'LiteSpeed caching is on.', 'acrossai-abilities-manager' ) : __( 'LiteSpeed caching is OFF — nothing is being cached.', 'acrossai-abilities-manager' ), ); } }