NAME
-
::tclCloudFlareZone -- class implementing the Zone Endpoints of the CloudFlare API V4 protocol.
CLASS HIERARCHY
-
oo::object
→ oo::class
→ ::tclCloudFlareZone
DESCRIPTION
-
Instances of this class implement the Zone Endpoint of the CloudFlare API V4 protocol.
CONSTRUCTOR
-
There is no particular contructor for the ::tclCloudFlareZone class. Instances should be created via the zone method of the ::tclCloudFlare.
DESTRUCTOR
-
Instances should not be destroyed.
EXPORTED METHODS
- files
- A list of URLs that should be removed from cache.
- tags
- Any assets served with a Cache-Tag header that matches one of the provided values sepcified will be purged from the Cloudflare cache.
$obj delete
$obj info ?item ?subitem? ?
-
Get the deteils about a zone.
If item and subitem are not present, a dictionary describing all of items the items in the zone are returned.
If only item is present, a dictionary describing all of subitems of that item in the zone are returned if item is a structured entity, otherwise the setting of the item is returned.
If both item and subitem are present, the setting of the subitem is returned.
$obj purge_everything
-
Remove ALL files from Cloudflare's cache for this zone.
$obj purge_files prugeDict
-
Granularly remove one or more files from Cloudflare's cache for this zone either by specifying the URL or the associated Cache-Tag. All tiers can purge by URL. Cache-Tag is for Enterprise only. The purgeDict consist of the following keys:
EXAMPLES
-
To purge all files:
set cf [::tclCloudFlare new user@example.com c2547eb745079dac9320b638f5e225cf483cc5cfdda41]set cfZone [$cf zone 023e105f4ecef8ad9ca31a8372d0c353] $cfZone purge_everything
or to purge only some files:
set cf [::tclCloudFlare new user@example.com c2547eb745079dac9320b638f5e225cf483cc5cfdda41]set cfZone [$cf zone 023e105f4ecef8ad9ca31a8372d0c353] $cfZone purge_files {files {{http://www.example.com/css/styles.css}} tags {{some-tag} {another-tag}}}