Fixed an issue when package cache (Library Manager) expires too fast // Resolve #2559

This commit is contained in:
Ivan Kravets
2019-05-27 12:24:20 +03:00
parent e1aa29cb36
commit 3f96dc1432
5 changed files with 6 additions and 7 deletions

View File

@ -48,6 +48,7 @@ PlatformIO 3.0
* Fixed "systemd-udevd" warnings in `99-platformio-udev.rules <http://docs.platformio.org/page/faq.html#platformio-udev-rules>`__ (`issue #2442 <https://github.com/platformio/platformio-core/issues/2442>`_)
* Fixed an issue when ``-U`` in ``build_flags`` does not remove macro previously defined via ``-D`` flag (`issue #2508 <https://github.com/platformio/platformio-core/issues/2508>`_)
* Fixed an issue for Project Generator when include path search order is inconsistent to what passed to the compiler (`issue #2509 <https://github.com/platformio/platformio-core/issues/2509>`_)
* Fixed an issue when package cache (Library Manager) expires too fast (`issue #2559 <https://github.com/platformio/platformio-core/issues/2559>`_)
3.6.7 (2019-04-23)
~~~~~~~~~~~~~~~~~~

2
docs

Submodule docs updated: abdccc987a...4dd1a54860

View File

@ -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()

View File

@ -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"]

View File

@ -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 = [