Caching templates to allow for dynamic template generation

Co-authored-by: rbeard0330 <@dul2k3BKW6m>
This commit is contained in:
Emil Stenström 2021-02-15 21:07:14 +01:00 committed by GitHub
parent 3919943cbd
commit 07986c5216
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 36 additions and 17 deletions

View file

@ -15,6 +15,10 @@ class AppSettings:
def LIBRARIES(self):
return self.settings.setdefault("libraries", [])
@property
def TEMPLATE_CACHE_SIZE(self):
return self.settings.setdefault("template_cache_size", 128)
app_settings = AppSettings()
app_settings.__name__ = __name__