diff --git a/HISTORY.rst b/HISTORY.rst index 44a6cee6..0d7d0a7f 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -48,6 +48,7 @@ PlatformIO 3.0 * Fixed "systemd-udevd" warnings in `99-platformio-udev.rules `__ (`issue #2442 `_) * Fixed an issue when ``-U`` in ``build_flags`` does not remove macro previously defined via ``-D`` flag (`issue #2508 `_) * Fixed an issue for Project Generator when include path search order is inconsistent to what passed to the compiler (`issue #2509 `_) +* Fixed an issue when package cache (Library Manager) expires too fast (`issue #2559 `_) 3.6.7 (2019-04-23) ~~~~~~~~~~~~~~~~~~ diff --git a/docs b/docs index abdccc98..4dd1a548 160000 --- a/docs +++ b/docs @@ -1 +1 @@ -Subproject commit abdccc987a03354bb80863e98dc109dd6b990cbe +Subproject commit 4dd1a548609ffaa4c53999756f06e924e8de20f2 diff --git a/platformio/managers/lib.py b/platformio/managers/lib.py index e26a6cb8..9824afcd 100644 --- a/platformio/managers/lib.py +++ b/platformio/managers/lib.py @@ -31,6 +31,8 @@ from platformio.project.helpers import get_project_global_lib_dir class LibraryManager(BasePkgManager): + FILE_CACHE_VALID = "30d" # 1 month + def __init__(self, package_dir=None): if not package_dir: package_dir = get_project_global_lib_dir() diff --git a/platformio/managers/package.py b/platformio/managers/package.py index a089cc5d..cd0f0d1a 100644 --- a/platformio/managers/package.py +++ b/platformio/managers/package.py @@ -139,8 +139,8 @@ class PkgInstallerMixin(object): SRC_MANIFEST_NAME = ".piopkgmanager.json" TMP_FOLDER_PREFIX = "_tmp_installing-" - FILE_CACHE_VALID = "1m" # 1 month - FILE_CACHE_MAX_SIZE = 1024 * 1024 + FILE_CACHE_VALID = None # for example, 1 week = "7d" + FILE_CACHE_MAX_SIZE = 1024 * 1024 * 50 # 50 Mb MEMORY_CACHE = {} @@ -843,8 +843,6 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin): class PackageManager(BasePkgManager): - FILE_CACHE_VALID = None # disable package caching - @property def manifest_names(self): return ["package.json"] diff --git a/platformio/managers/platform.py b/platformio/managers/platform.py index 56625efe..8a5de2ef 100644 --- a/platformio/managers/platform.py +++ b/platformio/managers/platform.py @@ -41,8 +41,6 @@ except ImportError: class PlatformManager(BasePkgManager): - FILE_CACHE_VALID = None # disable platform download caching - def __init__(self, package_dir=None, repositories=None): if not repositories: repositories = [