MCPcopy Create free account
hub / github.com/pyload/pyload / get_bucket

Method get_bucket

module/lib/jinja2/bccache.py:156–164  ·  view source on GitHub ↗

Return a cache bucket for the given template. All arguments are mandatory but filename may be `None`.

(self, environment, name, filename, source)

Source from the content-addressed store, hash-verified

154 return sha1(source.encode('utf-8')).hexdigest()
155
156 def get_bucket(self, environment, name, filename, source):
157 """Return a cache bucket for the given template. All arguments are
158 mandatory but filename may be `None`.
159 """
160 key = self.get_cache_key(name, filename)
161 checksum = self.get_source_checksum(source)
162 bucket = Bucket(environment, key, checksum)
163 self.load_bytecode(bucket)
164 return bucket
165
166 def set_bucket(self, bucket):
167 """Put the bucket into the cache."""

Callers 1

loadMethod · 0.80

Calls 4

get_cache_keyMethod · 0.95
get_source_checksumMethod · 0.95
load_bytecodeMethod · 0.95
BucketClass · 0.70

Tested by

no test coverage detected