OpenQuizz
Une application de gestion des contenus pédagogiques
SimpleWheelCache Class Reference
Inheritance diagram for SimpleWheelCache:
Collaboration diagram for SimpleWheelCache:

Public Member Functions

def __init__ (self, cache_dir, format_control)
 
def get_path_for_link (self, link)
 
def get (self, link, package_name, supported_tags)
 
- Public Member Functions inherited from Cache
def __init__ (self, cache_dir, format_control, allowed_formats)
 

Additional Inherited Members

- Data Fields inherited from Cache
 cache_dir
 
 format_control
 
 allowed_formats
 

Detailed Description

A cache of wheels for future installs.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  cache_dir,
  format_control 
)

Member Function Documentation

◆ get()

def get (   self,
  link,
  package_name,
  supported_tags 
)
Returns a link to a cached item if it exists, otherwise returns the
passed link.

Reimplemented from Cache.

◆ get_path_for_link()

def get_path_for_link (   self,
  link 
)
Return a directory to store cached wheels for link

Because there are M wheels for any one sdist, we provide a directory
to cache them in, and then consult that directory when looking up
cache hits.

We only insert things into the cache if they have plausible version
numbers, so that we don't contaminate the cache with things that were
not unique. E.g. ./package might have dozens of installs done for it
and build a version of 0.0...and if we built and cached a wheel, we'd
end up using the same wheel even if the source has been edited.

:param link: The link of the sdist for which this will cache wheels.

Reimplemented from Cache.


The documentation for this class was generated from the following file: