ResourceRegister

ResourceRegister[resource]

creates a persistent cache of a resource object that can be referenced by name.

ResourceRegister[resource, loc]

stores the resource in persistence location loc.

ResourceRegister[resource, {loc1,}]

stores the resource in multiple persistence locations.

Details and Options

Examples

open allclose all

Basic Examples  (2)

Create a data resource:

Register the resource:

Retrieve the data by using the resource name in ResourceData:

Register a ResourceFunction:

Reference the function by name:

Scope  (2)

Create a new data resource:

The resource is not discoverable by name:

Registering the resource allows it to be discovered by name:

Create a new neural net resource:

Register the resource locally and in the Wolfram Cloud:

Properties & Relations  (2)

Resource registration persists between sessions:

Register the resource and Quit the kernel session:

The resource is cached to disk and can be referenced by name:

Resource registrations remain until they are removed:

DeleteObject removes the resource from the registry:

Possible Issues  (1)

Registering a second resource with an identical name will replace the original resource in the registry:

Referencing the resource by name will give the new result:

The first resource still exists and can be used with the ResourceObject:

Introduced in 2017
 (11.2)