Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 0 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,33 +78,6 @@ $cache->purgeKeys([

Fastly domain purges invalidate the entire configured service. Use one domain per Fastly service when calling `purgeDomain()`. Cloudflare hostname purging depends on the cache-purge features enabled for your plan.

### Cache routing

`Cache\Adapter\Proxy` routes domain and path purges: it sends the application domain to one adapter, configured network domains to another, and fans custom domains out to every custom adapter.

```php
use Utopia\Cdn\Cache\Adapter\Proxy;

$cache = new Cache(new Proxy(
appDomain: 'app.example.com',
appDomainAdapter: $cloudflareCache,
networkAdapter: $fastlyCache,
customDomainAdapters: [$cloudflareCache, $fastlyCache],
networkDomains: ['network.example.com'],
));
```

Cache keys and tags are scoped to a Fastly service or Cloudflare zone. Consequently, `Proxy` does not route `purgeKeys()` calls. The consuming application must select the adapter using its own routing context before constructing `Cache`:

```php
$adapter = $cdnAdapterResolver->resolve($rule);

$cache = new Cache($adapter);
$cache->purgeKeys([
'domain-' . \strtolower($domain),
]);
```

## Certificates

The current certificate provider support is focused on CDN-managed certificates through Fastly TLS subscriptions.
Expand Down
78 changes: 0 additions & 78 deletions src/Cdn/Cache/Adapter/Proxy.php

This file was deleted.

83 changes: 0 additions & 83 deletions tests/Cdn/Cache/Adapter/ProxyTest.php

This file was deleted.

Loading