Skip to content

Commit a72da44

Browse files
committed
Remove unused/inactive purge prefixes command
1 parent 93e179a commit a72da44

3 files changed

Lines changed: 0 additions & 28 deletions

File tree

src/HeaderEnum.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ enum HeaderEnum: string
66
{
77
case CACHE_TAG = 'Cache-Tag';
88
case CACHE_PURGE_TAG = 'Cache-Purge-Tag';
9-
case CACHE_PURGE_PREFIX = 'Cache-Purge-Prefix';
109
case CACHE_CONTROL = 'Cache-Control';
1110
case CDN_CACHE_CONTROL = 'CDN-Cache-Control';
1211
case SURROGATE_CONTROL = 'Surrogate-Control';

src/StaticCache.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -292,24 +292,6 @@ public function purgeTags(string|StaticCacheTag ...$tags): void
292292
]);
293293
}
294294

295-
public function purgeUrlPrefixes(string ...$urlPrefixes): void
296-
{
297-
$urlPrefixes = Collection::make($urlPrefixes)->filter()->unique();
298-
299-
if ($urlPrefixes->isEmpty()) {
300-
return;
301-
}
302-
303-
Craft::info(new PsrMessage('Purging URL prefixes', [
304-
'urlPrefixes' => $urlPrefixes->all(),
305-
]), __METHOD__);
306-
307-
// TODO: make sure we don't go over max header size
308-
Helper::makeGatewayApiRequest([
309-
HeaderEnum::CACHE_PURGE_PREFIX->value => $urlPrefixes->implode(','),
310-
]);
311-
}
312-
313295
private function isCacheable(): bool
314296
{
315297
$response = Craft::$app->getResponse();

src/cli/controllers/StaticCacheController.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@
88

99
class StaticCacheController extends Controller
1010
{
11-
public function actionPurgePrefixes(string ...$prefixes): int
12-
{
13-
$this->do('Purging prefixes', function() use ($prefixes) {
14-
Module::getInstance()->getStaticCache()->purgeUrlPrefixes(...$prefixes);
15-
});
16-
17-
return ExitCode::OK;
18-
}
19-
2011
public function actionPurgeTags(string ...$tags): int
2112
{
2213
$this->do('Purging tags', function() use ($tags) {

0 commit comments

Comments
 (0)