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

Public Member Functions

def __init__ (self, cache_dir, format_control)
 
def get_path_for_link (self, link)
 
def get_ephem_path_for_link (self, link)
 
def get (self, link, package_name, supported_tags)
 
def get_cache_entry (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

Wraps EphemWheelCache and SimpleWheelCache into a single Cache

This Cache allows for gracefully degradation, using the ephem wheel cache
when a certain link is not found in the simple wheel cache first.

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_cache_entry()

def get_cache_entry (   self,
  link,
  package_name,
  supported_tags 
)
Returns a CacheEntry with a link to a cached item if it exists or
None. The cache entry indicates if the item was found in the persistent
or ephemeral cache.

◆ get_ephem_path_for_link()

def get_ephem_path_for_link (   self,
  link 
)

◆ get_path_for_link()

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

Reimplemented from Cache.


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