LocalCache[CloudObject[uri]]
caches a cloud object in a local object.
LocalCache[URL[url]]
caches the contents of a url in a local object.
LocalCache[obj,LocalObject[name]]
caches the contents of obj in the specified local object.
LocalCache
LocalCache[CloudObject[uri]]
caches a cloud object in a local object.
LocalCache[URL[url]]
caches the contents of a url in a local object.
LocalCache[obj,LocalObject[name]]
caches the contents of obj in the specified local object.
Details
- LocalCache[obj] chooses the name of the caching local object based on the name of obj.
- Local caches by default are created under the directory given by $CacheBaseDirectory.
- Reevaluating LocalCache[obj] fetches a new copy of obj only if necessary, or if no modification time is available.
- LocalCache[URL[url]] uses URLDownload to obtain the contents of url.
Examples
open all close allBasic Examples (1)
cache = LocalCache[CloudObject["https://www.wolframcloud.com/obj/documentation/question"]]Get[cache]Cache the contents of a web URL:
img = LocalCache[URL["http://www.wolfram.com/spikey/img/spikey.png"]]Import[img]Scope (1)
Properties & Relations (2)
Create and cache a cloud object, then update its contents:
Put[42, CloudObject["question2"]];cache = LocalCache[CloudObject["question2"]];Put[43, CloudObject["question2"]];The cache still contains the old version:
Get[cache]cache = LocalCache[CloudObject["question2"]];Get[cache]List all existing cache objects under $CacheBaseDirectory:
LocalObjects[$CacheBaseDirectory]Related Guides
History
Text
Wolfram Research (2016), LocalCache, Wolfram Language function, https://reference.wolfram.com/language/ref/LocalCache.html.
CMS
Wolfram Language. 2016. "LocalCache." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LocalCache.html.
APA
Wolfram Language. (2016). LocalCache. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LocalCache.html
BibTeX
@misc{reference.wolfram_2026_localcache, author="Wolfram Research", title="{LocalCache}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/LocalCache.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_localcache, organization={Wolfram Research}, title={LocalCache}, year={2016}, url={https://reference.wolfram.com/language/ref/LocalCache.html}, note=[Accessed: 12-June-2026]}