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.
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
- The resource can be either a ResourceObject or ResourceFunction.
- The resource cache contains both metadata and contents.
- The persistence locations can be any of the values supported by PersistenceLocation.
- ResourceRegister[resource] is equivalent to ResourceRegister[resource,$PersistenceBase].
- Registering a private resource allows it to be referenced by name in ResourceObject[name] and other appropriate functions.
- Additional functions that accept a registered resource name depend on the resource's "ResourceType".
- Resources from a public Wolfram repository can always be found using ResourceObject[name] without using ResourceRegister.
- ResourceRegister[resource] returns the resource.
- DeleteObject removes both the resource registry and any local cache of the resource.
- If the resource is registered in a "Local" PersistenceLocation, the resource content will be cached locally with LocalCache[resource].
- If the resource is registered in a "Cloud" PersistenceLocation, the resource content will be deployed to the cloud with CloudDeploy[resource].
Examples
open all close allBasic Examples (2)
ro = ResourceObject[<|"Name" -> "Ten Thousand Primes",
"ResourceType" -> "Data", "Content" -> Prime[Range[10000]]|>]ResourceRegister[ro]Retrieve the data by using the resource name in ResourceData:
ResourceData["Ten Thousand Primes"]//ShortRegister a ResourceFunction:
rf = DefineResourceFunction[# ^ 2 + 1&, "squareplusone"]ResourceRegister[rf]Reference the function by name:
ResourceFunction["squareplusone"][10]Scope (2)
ro = ResourceObject[<|"Name" -> "English Words",
"ResourceType" -> "Data", "Content" -> WordList[], "Description" -> "A collection of English language words"|>]The resource is not discoverable by name:
ResourceObject["English Words"]Registering the resource allows it to be discovered by name:
ResourceRegister[ro];
ResourceObject["English Words"]Create a new neural net resource:
ro = ResourceObject[<|"Name" -> "Simple Net",
"ResourceType" -> "NeuralNet",
"ContentElements" -> <|"Net" -> NetChain[{ElementwiseLayer[Ramp]}]|>,
"DefaultContentElement" -> "Net", "Description" -> "A simple neural network with just one layer"|>]Register the resource locally and in the Wolfram Cloud:
ResourceRegister[ro, {"Local", "Cloud"}];
ResourceData["Simple Net"]Properties & Relations (2)
Resource registration persists between sessions:
ro = ResourceObject[<|"Name" -> "All About Frogs",
"ResourceType" -> "Data", "Content" -> WikipediaData["Frogs"], "Description" -> "Wikipedia information about frogs"|>]Register the resource and Quit the kernel session:
ResourceRegister[ro];
QuitThe resource is cached to disk and can be referenced by name:
ResourceData["All About Frogs"]//SnippetResource registrations remain until they are removed:
ResourceRegister[DefineResourceFunction[# ^ 2 + 2&, "squareplustwo"]];
ResourceFunction["squareplustwo"][10]DeleteObject removes the resource from the registry:
DeleteObject[ResourceFunction["squareplustwo"]];
ResourceFunction["squareplustwo"]Possible Issues (1)
Registering a second resource with an identical name will replace the original resource in the registry:
originalro = ResourceObject[<|"Name" -> "New York Population",
"ResourceType" -> "Data", "Content" -> ["New york"]["Population"]|>];ResourceRegister[originalro];ResourceData["New York Population"]ResourceRegister[ResourceObject[<|"Name" -> "New York Population",
"ResourceType" -> "Data", "Content" -> ["New York State"]["Population"]|>]]Referencing the resource by name will give the new result:
ResourceData["New York Population"]The first resource still exists and can be used with the ResourceObject:
ResourceData[originalro]Related Guides
History
Text
Wolfram Research (2017), ResourceRegister, Wolfram Language function, https://reference.wolfram.com/language/ref/ResourceRegister.html.
CMS
Wolfram Language. 2017. "ResourceRegister." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ResourceRegister.html.
APA
Wolfram Language. (2017). ResourceRegister. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ResourceRegister.html
BibTeX
@misc{reference.wolfram_2026_resourceregister, author="Wolfram Research", title="{ResourceRegister}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/ResourceRegister.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_resourceregister, organization={Wolfram Research}, title={ResourceRegister}, year={2017}, url={https://reference.wolfram.com/language/ref/ResourceRegister.html}, note=[Accessed: 13-June-2026]}