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

Public Member Functions

def __init__ (self, base=None)
 
def is_stale (self, resource, path)
 
def get (self, resource)
 
- Public Member Functions inherited from Cache
def prefix_to_dir (self, prefix)
 
def clear (self)
 

Additional Inherited Members

- Data Fields inherited from Cache
 base
 

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  base = None 
)
Initialise an instance.

:param base: The base directory where the cache should be located.

Reimplemented from Cache.

Member Function Documentation

◆ get()

def get (   self,
  resource 
)
Get a resource into the cache,

:param resource: A :class:`Resource` instance.
:return: The pathname of the resource in the cache.

◆ is_stale()

def is_stale (   self,
  resource,
  path 
)
Is the cache stale for the given resource?

:param resource: The :class:`Resource` being cached.
:param path: The path of the resource in the cache.
:return: True if the cache is stale.

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