Skip to content

Commit 8db20c1

Browse files
committed
Deprecate non-tag based methods
1 parent 7a50b2a commit 8db20c1

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/HeaderEnum.php

Lines changed: 5 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';
@@ -15,6 +14,11 @@ enum HeaderEnum: string
1514
case REQUEST_TYPE = 'Request-Type';
1615
case SET_COOKIE = 'Set-Cookie';
1716

17+
/**
18+
* @deprecated Use tag-based purging.
19+
*/
20+
case CACHE_PURGE_PREFIX = 'Cache-Purge-Prefix';
21+
1822
public function matches(string $name): bool
1923
{
2024
return strcasecmp($this->value, $name) === 0;

src/StaticCache.php

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

295+
/**
296+
* @deprecated Use tag-based purging.
297+
*/
295298
public function purgeUrlPrefixes(string ...$urlPrefixes): void
296299
{
297300
$urlPrefixes = Collection::make($urlPrefixes)->filter()->unique();

0 commit comments

Comments
 (0)