Cache css and js based on commit hash or version number

This commit is contained in:
JonnyWong16 2017-11-01 19:23:14 -07:00
parent ef6ef868e0
commit 0d54e9f2d6
10 changed files with 20 additions and 18 deletions

View file

@ -61,13 +61,15 @@ def serve_template(templatename, **kwargs):
_hplookup = TemplateLookup(directories=[template_dir], default_filters=['unicode', 'h'])
http_root = plexpy.HTTP_ROOT
server_name = plexpy.CONFIG.PMS_NAME
cache_param = '?' + plexpy.CURRENT_VERSION or common.VERSION_NUMBER
_session = get_session_info()
try:
template = _hplookup.get_template(templatename)
return template.render(http_root=plexpy.HTTP_ROOT, server_name=server_name,
return template.render(http_root=http_root, server_name=server_name, cache_param=cache_param,
_session=_session, **kwargs)
except:
return exceptions.html_error_template().render()