Shared Hosting for Everyone, imagined by developers, for developers.
Discovering the Public CloudTo speed up access to your website, you can set up the HTTP cache. Here are the steps required to do this:
So that the cache can query the upstream to determine that the targeted
resource has not been changed, the application must provide the
Etag
and/or Last-Modified
header.
A response CANNOT be cached if:
the Vary
header is *
,
the Content-Type
header is not present,
the resource Content-Type
is not one of the following values:
text/html
text/xml
application/xml
application/html+xml
application/rss+xml
application/rdf+xml
application/atom+xml
text/javascript
;the Cache-Control
header takes one of the following values:
private
no-store
no-cache
no-transform
;the Set-Cookie
header is present,
the Authorization
header exists, but Cache-Control
takes none of
the following values:
public
must-revalidate
proxy-revalidate
s-maxage
;The HTTP status code is not one of the following:
This is done in Web > Sites > Edit the [site] - ⚙️ > Cache.
PURGE
PURGE
can be executed in three different ways at alwaysdata:
https://test.alwaysdata.net/foo/bar
). This will remove the related cache entry and its variations (generated by the Vary
header);X-Cache-Purge-Match: wildcard
header and adding a wildcard to your URL (e.g. https://test.alwaysdata.net/*
). This will remove all entries matching the URL template;X-Cache-Purge-Match: startswith
header and adding a partial path to your URL (e.g. https://test.alwaysdata.net/foo
). This will remove all entries matching the URL template (and thus https://test.alwaysdata.net/foo/bar
).