is the directory on your local file system used for storing cache data.
$CacheBaseDirectory
is the directory on your local file system used for storing cache data.
Details
- $CacheBaseDirectory can be set to any directory name.
- $CacheBaseDirectory=File["path"] is also supported.
- The initial value of $CacheBaseDirectory is chosen based on operating-system conventions.
Examples
open all close allBasic Examples (1)
Give the directory currently used for caches:
$CacheBaseDirectorySet the cache directory to a temporary path:
$CacheBaseDirectory = FileNameJoin[{$TemporaryDirectory, "caches"}]Reset the cache base to its default location:
$CacheBaseDirectory=.Scope (1)
Give a File object to use as cache base directory:
$CacheBaseDirectory = File["/tmp/MyCacheBase"]Applications (1)
List all existing cache objects under $CacheBaseDirectory:
LocalObjects[$CacheBaseDirectory]DeleteFile /@ %;Properties & Relations (1)
Local objects created by LocalCache are by default stored under $CacheBaseDirectory:
cache = LocalCache[CloudObject["https://www.wolframcloud.com/obj/user-b0c28e9f-876d-4478-9d8b-9e7d18a9ea81/question"]]img = LocalCache[URL["http://www.wolfram.com/img/homepage/header-spikey.png"]]See Also
Related Guides
History
Text
Wolfram Research (2016), $CacheBaseDirectory, Wolfram Language function, https://reference.wolfram.com/language/ref/$CacheBaseDirectory.html.
CMS
Wolfram Language. 2016. "$CacheBaseDirectory." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/$CacheBaseDirectory.html.
APA
Wolfram Language. (2016). $CacheBaseDirectory. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$CacheBaseDirectory.html
BibTeX
@misc{reference.wolfram_2026_$cachebasedirectory, author="Wolfram Research", title="{$CacheBaseDirectory}", year="2016", howpublished="\url{https://reference.wolfram.com/language/ref/$CacheBaseDirectory.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_$cachebasedirectory, organization={Wolfram Research}, title={$CacheBaseDirectory}, year={2016}, url={https://reference.wolfram.com/language/ref/$CacheBaseDirectory.html}, note=[Accessed: 13-June-2026]}