Purge Server
Purges the Edgemesh® Server cache. Edgemesh® Server implements a stale while revalidate strategy and cached objects are revalidated on request every 15 minutes. Purging caches have negative impacts on performance while caches are rebuilt and should be avoided if possible. Instead, let Edgemesh® automatically update the caches for the best-sustained performance. Edgemesh® Server provides more fine-grained control over cache purges so you can purge specific resources.
This route is exposed as both a
GET
and aPOST
. This provides flexibility when used as a webhook endpoint. When requesting with theGET
method, all request parameters are provided via search parameters. When requesting with thePOST
method, the request parameters are sent in the request body.
Request Parameters
all
: Purge all resources. No additional parameters are required with this purge type.pathname
: Purge by specific pathname. The pathname excludes all search parameters and must start with/
. When this type is selected, thepathname
parameter is also required.mime
: Purge by a specific content type. When this type is selected, themime
parameter is also required.
pathname
, this is the pathname to purge. It must start with /
and exclude all search parameters.html
: Purge all hypertext markup language (HTML) documents.css
: Purge all cascading style sheets (CSS).json
: Purge all javascript object notation (JSON) responses.xml
: Purge all extensible markup language (XML) documents.text
: Purge all plain text responses.javascript
: Purge all javascript responses.image
: Purge all image responses.media
: Purge all audio and video responses.
Response Properties
https://api.edgemesh.com/2022-08/cache/purge/server