mirror of
https://github.com/SSLMate/certspotter.git
synced 2025-12-18 20:54:20 +01:00
Add $CERTSPOTTER_CACHE_DIR for specifying cache directory
This commit is contained in:
@@ -78,7 +78,9 @@ func defaultConfigDir() string {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
func defaultCacheDir() string {
|
func defaultCacheDir() string {
|
||||||
if envVar := os.Getenv("CACHE_DIRECTORY"); envVar != "" && startedBySupervisor() {
|
if envVar := os.Getenv("CERTSPOTTER_CACHE_DIR"); envVar != "" {
|
||||||
|
return envVar
|
||||||
|
} else if envVar := os.Getenv("CACHE_DIRECTORY"); envVar != "" && startedBySupervisor() {
|
||||||
return envVar
|
return envVar
|
||||||
}
|
}
|
||||||
userCacheDir, err := os.UserCacheDir()
|
userCacheDir, err := os.UserCacheDir()
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ State directory
|
|||||||
|
|
||||||
Cache directory
|
Cache directory
|
||||||
|
|
||||||
: Stores cached data. The location is (1) the `CACHE_DIRECTORY` environment, if set and certspotter is running under systemd, or (2) `$XDG_CACHE_HOME/certspotter` (which on Linux is `~/.cache/certspotter` by default). You can delete this directory without impacting functionality, but certspotter may need to perform additional computation or network requests.
|
: Stores cached data. The location is (1) the `CERTSPOTTER_CACHE_DIR` environment variable if set, (2) the `CACHE_DIRECTORY` environment, if set and certspotter is running under systemd, or (3) `$XDG_CACHE_HOME/certspotter` (which on Linux is `~/.cache/certspotter` by default). You can delete this directory without impacting functionality, but certspotter may need to perform additional computation or network requests.
|
||||||
|
|
||||||
# SEE ALSO
|
# SEE ALSO
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user