Return a cache bucket for the given template. All arguments are mandatory but filename may be `None`.
(self, environment, name, filename, source)
| 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.""" |
no test coverage detected