Cache for FreeMarker templates and set cache-control for static resources from themes