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

Public Member Functions

def __init__ (self, cache_dir, format_control, allowed_formats)
 
def get_path_for_link (self, link)
 
def get (self, link, package_name, supported_tags)
 

Data Fields

 cache_dir
 
 format_control
 
 allowed_formats
 

Detailed Description

An abstract class - provides cache directories for data from links


    :param cache_dir: The root of the cache.
    :param format_control: An object of FormatControl class to limit
        binaries being read from the cache.
    :param allowed_formats: which formats of files the cache should store.
        ('binary' and 'source' are the only allowed values)

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  cache_dir,
  format_control,
  allowed_formats 
)

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 in WheelCache, and SimpleWheelCache.

◆ get_path_for_link()

def get_path_for_link (   self,
  link 
)
Return a directory to store cached items in for link.

Reimplemented in WheelCache, and SimpleWheelCache.

Field Documentation

◆ allowed_formats

allowed_formats

◆ cache_dir

cache_dir

◆ format_control

format_control

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