MCPcopy Index your code
hub / github.com/nodejs/node / get_bucket

Method get_bucket

tools/inspector_protocol/jinja2/bccache.py:180–188  ·  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

178 return sha1(source.encode('utf-8')).hexdigest()
179
180 def get_bucket(self, environment, name, filename, source):
181 """Return a cache bucket for the given template. All arguments are
182 mandatory but filename may be `None`.
183 """
184 key = self.get_cache_key(name, filename)
185 checksum = self.get_source_checksum(source)
186 bucket = Bucket(environment, key, checksum)
187 self.load_bytecode(bucket)
188 return bucket
189
190 def set_bucket(self, bucket):
191 """Put the bucket into the cache."""

Callers 1

loadMethod · 0.45

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