Let us walk on the 3-isogeny graph
Loading...
Searching...
No Matches
pip._internal.network.cache Namespace Reference

Data Structures

class  SafeFileCache
 

Functions

bool is_from_cache (Response response)
 
Generator[None, None, Nonesuppressed_cache_errors ()
 

Detailed Description

HTTP cache implementation.

Function Documentation

◆ is_from_cache()

bool is_from_cache ( Response  response)

Definition at line 16 of file cache.py.

16def is_from_cache(response: Response) -> bool:
17 return getattr(response, "from_cache", False)
18
19
20@contextmanager
for i

References i.

◆ suppressed_cache_errors()

Generator[None, None, None] suppressed_cache_errors ( )
If we can't access the cache then we can just skip caching and process
requests as if caching wasn't enabled.

Definition at line 21 of file cache.py.

21def suppressed_cache_errors() -> Generator[None, None, None]:
22 """If we can't access the cache then we can just skip caching and process
23 requests as if caching wasn't enabled.
24 """
25 try:
26 yield
27 except OSError:
28 pass
29
30

Referenced by SafeFileCache.delete(), SafeFileCache.get(), and SafeFileCache.set().

Here is the caller graph for this function: