class ClearCacheController implements RequestHandlerInterface

Clears the cache, reporting each step as it finishes.

The work recompiles every asset bundle for every frontend and locale, which is tens of seconds where the assets live on remote storage. Waiting until the end to answer leaves the admin watching a spinner with no way to tell a slow clear from a dead request, so the steps are streamed ({\Flarum\Http\EventStream}).

Methods

__construct( CacheClearCommand $command, AssetsPublishCommand $assetsPublishCommand, EventStream $events)

No description

ResponseInterface
handle( ServerRequestInterface $request)

No description

Details

__construct( CacheClearCommand $command, AssetsPublishCommand $assetsPublishCommand, EventStream $events)

Parameters

CacheClearCommand $command
AssetsPublishCommand $assetsPublishCommand
EventStream $events

ResponseInterface handle( ServerRequestInterface $request)

Parameters

ServerRequestInterface $request

Return Value

ResponseInterface