Qucs-S S-parameter Viewer & RF Synthesis Tools
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
jinja2.bccache.FileSystemBytecodeCache Class Reference
Inheritance diagram for jinja2.bccache.FileSystemBytecodeCache:
Inheritance graph
[legend]
Collaboration diagram for jinja2.bccache.FileSystemBytecodeCache:
Collaboration graph
[legend]

Public Member Functions

None __init__ (self, t.Optional[str] directory=None, str pattern="__jinja2_%s.cache")
 
None load_bytecode (self, Bucket bucket)
 
None dump_bytecode (self, Bucket bucket)
 
None clear (self)
 
- Public Member Functions inherited from jinja2.bccache.BytecodeCache
str get_cache_key (self, str name, t.Optional[t.Union[str]] filename=None)
 
str get_source_checksum (self, str source)
 
Bucket get_bucket (self, "Environment" environment, str name, t.Optional[str] filename, str source)
 
None set_bucket (self, Bucket bucket)
 

Public Attributes

 directory
 
 pattern
 

Protected Member Functions

str _get_default_cache_dir (self)
 
str _get_cache_filename (self, Bucket bucket)
 

Detailed Description

A bytecode cache that stores bytecode on the filesystem.  It accepts
two arguments: The directory where the cache items are stored and a
pattern string that is used to build the filename.

If no directory is specified a default cache directory is selected.  On
Windows the user's temp directory is used, on UNIX systems a directory
is created for the user in the system temp directory.

The pattern can be used to have multiple separate caches operate on the
same directory.  The default pattern is ``'__jinja2_%s.cache'``.  ``%s``
is replaced with the cache key.

>>> bcc = FileSystemBytecodeCache('/tmp/jinja_cache', '%s.cache')

This bytecode cache supports clearing of the cache using the clear method.

Member Function Documentation

◆ clear()

None jinja2.bccache.FileSystemBytecodeCache.clear (   self)
Clears the cache.  This method is not used by Jinja but should be
implemented to allow applications to clear the bytecode cache used
by a particular environment.

Reimplemented from jinja2.bccache.BytecodeCache.

◆ dump_bytecode()

None jinja2.bccache.FileSystemBytecodeCache.dump_bytecode (   self,
Bucket  bucket 
)
Subclasses have to override this method to write the bytecode
from a bucket back to the cache.  If it unable to do so it must not
fail silently but raise an exception.

Reimplemented from jinja2.bccache.BytecodeCache.

◆ load_bytecode()

None jinja2.bccache.FileSystemBytecodeCache.load_bytecode (   self,
Bucket  bucket 
)
Subclasses have to override this method to load bytecode into a
bucket.  If they are not able to find code in the cache for the
bucket, it must not do anything.

Reimplemented from jinja2.bccache.BytecodeCache.


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