The Cloudsmith Developer Hub

Welcome to the Cloudsmith Developer Hub. You'll find comprehensive guides and documentation to help you start working with Cloudsmith as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Edge Caching

Edge Caching Rules allow you to control how long assets stay close to your users, all across the world. Edge cached assets will be immediately available for use with minimal time required to fetch them. You can use Edge Caching rules to reduce latency, achieve better throughput and provide higher availability.


Create an Edge Caching Rule

To create new Edge Caching rules, click "Edge Caching" on the left-hand repository menu and then click the green "Create Rule" button:

Edge Caching Create Rule button

You will then be presented with the Create Edge Caching Rule form, this is where you define your cache rule parameters:

Create Edge Caching Rule Form

Form Fields

Field

Description

Package Format

The package format that you want this cache rule to apply to

Pattern

The file path pattern that this cache rule applies to. Patterns may consist of alphanumeric characters and the Glob (*) character used to wildcard match.

Please be aware that if this pattern covers repository metadata for a format, then new packages will not be visible until the TTL has expired.

Priority

By default, cache rules will be matched in the order they were created. Setting a Priority allows you to augment or override this behaviour. Rules with higher priority values take precedence.

TTL

The TTL (Time-To-Live) associated with this cache rule (in seconds). Packages that are matched to this rule will be cached at the content distribution network for this number of seconds. Please select TTL values with care as we do not currently offer a way to request a cache invalidation (although that will be coming soon!).

🚧

Our default TTL values are 60s for metadata and 600s for packages.

Once you have defined your cache rule parameters, click the green "+ Create Rule" button to create and apply the rule:

Pattern Examples

Match all file paths containing "cloudsmith":

*cloudsmith*

Match all .gz files:

*.gz

Match all SNAPSHOT jar packages:

*-SNAPSHOT.jar

Edit an Edge Caching Rule

To edit an Edge Caching Rule, click the blue "Edit" button on the cache rule you wish to modify:

Edge Caching Edit Button

You are then presented with the Edit Rule form:

Once you have modified the parameters of the cache rule, click the blue "Edit" button to apply your changes.


Delete an Edge Caching Rule

To delete an Edge Caching rule, click the red "Delete rule" button on the cache rule you wish to delete:

You will then be presented with a form asking you to confirm the deletion of the cache rule:

Edge Caching Rule Delete Form

Click the red "Confirm Delete" button to delete the rule.

Updated 2 months ago


Edge Caching


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.