({{, (RefLink[$CacheBaseDirectory, paclet:ref/$CacheBaseDirectory]) 
is the directory on your local file system used for storing cache data.}})

OpenersNotesSection(Spacer1)Details

(RefLink[$CacheBaseDirectory, paclet:ref/$CacheBaseDirectory]) can be set to any directory name.

$CacheBaseDirectory=(RefLink[File, paclet:ref/File])["path"] is also supported.

The initial value of (RefLink[$CacheBaseDirectory, paclet:ref/$CacheBaseDirectory]) is chosen based on operating-system conventions.

OpenersPrimaryExamplesSection(Spacer1)Examples  (4)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Give the directory currently used for caches:

$CacheBaseDirectory

Set the cache directory to a temporary path:

$CacheBaseDirectory=FileNameJoin[{$TemporaryDirectory,"caches"}]

Reset the cache base to its default location:

$CacheBaseDirectory=.

OpenersExampleSection1(Spacer1)Scope  (1)

Give a (RefLink[File, paclet:ref/File]) object to use as cache base directory:

$CacheBaseDirectory=File["/tmp/MyCacheBase"]

OpenersExampleSection3(Spacer1)Applications  (1)

List all existing cache objects under (RefLink[$CacheBaseDirectory, paclet:ref/$CacheBaseDirectory]):

LocalObjects[$CacheBaseDirectory]

Delete them:

DeleteFile/@%;

OpenersExampleSection4(Spacer1)Properties & Relations  (1)

Local objects created by (RefLink[LocalCache, paclet:ref/LocalCache]) are by default stored under (RefLink[$CacheBaseDirectory, paclet:ref/$CacheBaseDirectory]):

cache=LocalCache[CloudObject[MouseOver]]

img=LocalCache[URL["http://www.wolfram.com/img/homepage/header-spikey.png"]]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[LocalCache, paclet:ref/LocalCache])  ▪  (RefLink[$LocalBase, paclet:ref/$LocalBase])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Local Objects, paclet:guide/LocalObjects])}})}})