Skip to content

Commit 9c3b0d5

Browse files
authored
Increase Python cache window (#1144)
* Increase Python cache window * Update pip.md * Update IPyPiClient.cs
1 parent fb58fbe commit 9c3b0d5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/detectors/pip.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ If no internet connection or a component cannot be found in PyPi, said component
5050
## Environment Variables
5151

5252
The environment variable `PyPiMaxCacheEntries` is used to control the size of the in-memory LRU cache that caches responses from PyPi.
53-
The default value is 128.
53+
The default value is 4096.
5454

5555
The enviroment variable `PIP_INDEX_URL` is used to determine what package feed should be used for `pip install --report` detection.
56-
The default value will use the PyPi index unless pip defaults have been configured globally.
56+
The default value will use the PyPi index unless pip defaults have been configured globally.

src/Microsoft.ComponentDetection.Detectors/pip/IPyPiClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public interface IPyPiClient
3030
public sealed class PyPiClient : IPyPiClient, IDisposable
3131
{
3232
// Values used for cache creation
33-
private const long CACHEINTERVALSECONDS = 60;
33+
private const long CACHEINTERVALSECONDS = 180;
3434

3535
private const long DEFAULTCACHEENTRIES = 4096;
3636

src/Microsoft.ComponentDetection.Detectors/pip/SimplePypiClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ namespace Microsoft.ComponentDetection.Detectors.Pip;
1818
public sealed class SimplePyPiClient : ISimplePyPiClient, IDisposable
1919
{
2020
// Values used for cache creation
21-
private const long CACHEINTERVALSECONDS = 60;
21+
private const long CACHEINTERVALSECONDS = 180;
2222
private const long DEFAULTCACHEENTRIES = 4096;
2323

2424
// max number of retries allowed, to cap the total delay period

0 commit comments

Comments
 (0)