Skip to content

Commit

Permalink
Change the two variables default values
Browse files Browse the repository at this point in the history
CLCACHE_DIR --> %LOCALAPPDATA%\clcache (e.g.'C:\\Users\\jshi19\\AppData\\Local\\clcache')
details see: frerich#342

CLCACHE_OBJECT_CACHE_TIMEOUT_MS --> 120s
details see: frerich#251
  • Loading branch information
shijunjing committed Mar 14, 2019
1 parent 4ff5ad6 commit 720c3fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clcache/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
from atomicwrites import atomic_write
import configparser

VERSION = "4.2.0-dev-edk2-20190116"
VERSION = "4.2.0-dev-edk2-20190314"

HashAlgorithm = hashlib.md5

Expand Down Expand Up @@ -355,7 +355,7 @@ def release(self):

@staticmethod
def forPath(path):
timeoutMs = int(os.environ.get('CLCACHE_OBJECT_CACHE_TIMEOUT_MS', 10 * 1000))
timeoutMs = int(os.environ.get('CLCACHE_OBJECT_CACHE_TIMEOUT_MS', 120 * 1000))
lockName = path.replace(':', '-').replace('\\', '-')
return CacheLock(lockName, timeoutMs)

Expand Down Expand Up @@ -506,7 +506,7 @@ def __init__(self, cacheDirectory=None):
try:
self.dir = os.environ["CLCACHE_DIR"]
except KeyError:
self.dir = os.path.join(os.path.expanduser("~"), "clcache")
self.dir = os.path.join(os.path.expandvars("%LOCALAPPDATA%"), "clcache")

manifestsRootDir = os.path.join(self.dir, "manifests")
ensureDirectoryExists(manifestsRootDir)
Expand Down

0 comments on commit 720c3fd

Please sign in to comment.