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

Method get_bucket

deps/v8/third_party/jinja2/bccache.py:165–179  ·  view source on GitHub ↗

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

(
        self,
        environment: "Environment",
        name: str,
        filename: t.Optional[str],
        source: str,
    )

Source from the content-addressed store, hash-verified

163 return sha1(source.encode("utf-8")).hexdigest()
164
165 def get_bucket(
166 self,
167 environment: "Environment",
168 name: str,
169 filename: t.Optional[str],
170 source: str,
171 ) -> Bucket:
172 """Return a cache bucket for the given template. All arguments are
173 mandatory but filename may be `None`.
174 """
175 key = self.get_cache_key(name, filename)
176 checksum = self.get_source_checksum(source)
177 bucket = Bucket(environment, key, checksum)
178 self.load_bytecode(bucket)
179 return bucket
180
181 def set_bucket(self, bucket: Bucket) -> None:
182 """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