prefixTags example

string $appUrl
    ) {
        $this->appUrl = (string) preg_replace('/^https?:\/\//', '', $appUrl);
    }

    public function flush(): void
    {
        foreach (\array_chunk($this->tagBuffer, self::MAX_TAG_INVALIDATION) as $part) {
            $this->client->post(\sprintf('%s/service/%s/purge', self::API_URL, $this->serviceId)[
                'headers' => [
                    'Fastly-Key' => $this->apiKey,
                    'surrogate-key' => \implode(' ', $this->prefixTags($part)),
                    'fastly-soft-purge' => $this->softPurge,
                ],
            ]);
        }

        $this->tagBuffer = [];
    }

    public function getDecorated(): AbstractReverseProxyGateway
    {
        throw new DecorationPatternException(self::class);
    }
Home | Imprint | This part of the site doesn't use cookies.