public class NetscapeCookieFileCache
extends java.lang.Object
NetscapeCookieFile
). May contain
at most n
entries, where the least-recently used one is evicted as
soon as more entries are added. The maximum number of entries (=n
)
can be set via the git config key http.cookieFileCacheLimit
. By
default it is set to 10.
The cache is global, i.e. it is shared among all consumers within the same Java process.
NetscapeCookieFile
Modifier and Type | Field and Description |
---|---|
private LRUMap<java.nio.file.Path,NetscapeCookieFile> |
cookieFileMap |
private static NetscapeCookieFileCache |
instance |
Modifier | Constructor and Description |
---|---|
private |
NetscapeCookieFileCache(HttpConfig config) |
Modifier and Type | Method and Description |
---|---|
NetscapeCookieFile |
getEntry(java.nio.file.Path path) |
static NetscapeCookieFileCache |
getInstance(HttpConfig config) |
private final LRUMap<java.nio.file.Path,NetscapeCookieFile> cookieFileMap
private static NetscapeCookieFileCache instance
private NetscapeCookieFileCache(HttpConfig config)
public static NetscapeCookieFileCache getInstance(HttpConfig config)
config
- the config which defines the limit for this cachepublic NetscapeCookieFile getEntry(java.nio.file.Path path)
path
- the path of the cookie file to retrieve