1 | <?php |
||
24 | class LiteSpeed extends HttpProxyClient implements PurgeCapable, TagCapable, ClearCapable, RefreshCapable |
||
25 | { |
||
26 | /** |
||
27 | * {@inheritdoc} |
||
28 | */ |
||
29 | public function clear() |
||
37 | |||
38 | /** |
||
39 | * {@inheritdoc} |
||
40 | */ |
||
41 | public function purge($url, array $headers = []) |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | public function invalidateTags(array $tags) |
||
65 | |||
66 | private function queuePurgeRequest(array $headers) |
||
67 | { |
||
68 | // TODO: LiteSpeed is likely going to hard code this URL, otherwise it has to be configurable |
||
69 | $purgeEndpoint = '/_fos_litespeed_purge_endpoint/'; |
||
70 | $headers['Authorization'] = 'Basic Zm9zOmZvczEyMw=='; // fos:fos123 |
||
71 | |||
72 | $this->queueRequest('PURGE', $purgeEndpoint, $headers); |
||
73 | } |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public function refresh($url, array $headers = []) |
||
85 | } |
||
86 |