public function clearCache(string $key)
{
$secret = $this->config('cache-secret');
if ($secret === null) {
\Airship\json_response(['status' => 'ERROR', 'message' => 'Cache-clearing secret value not set']);
}
if (!\hash_equals($secret, $key)) {
\Airship\json_response(['status' => 'ERROR', 'message' => 'Invalid cache-clearing secret value']);
}
\Airship\clear_cache();
\Airship\json_response(['status' => 'OK', 'message' => 'Cache cleared!']);
}