Skip to content

Should I preload templates outside of request handlers? #74

@basharov

Description

@basharov

In the examples I see that ace loads templates just inside the request handler, so that it runs this on each web request to this endpoint:

tmpl, err := ace.Load("index", "", nil)

Is it a good practice or should I load the template once before any request handler call then only run tmpl.Execute() inside the request handler?

Or does ace manage caching itself and I don't need to preload the template first and just leave as it is in the examples?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions