Skip to content

Reloadable templates #139

@janko

Description

@janko

dry-view currently seems to cache templates, as I don't see the changes being picked up before I restart the server. This is different to how e.g. Roda's rendering works, where templates are not cached but read from the filesystem each time, enabling changes to be picked up.

In development I would like templates to be reloadable, and it seems that none of the code reloaders suggested in the Roda README would help. I don't like the user experience of rerun and shotgun (suggested in #134), I would like to use one of the in-app reloaders that don't restart the whole web server.

Examples

Something like

class MyView < Dry::View
  config.cache = false
end

I would even have it enabled by default, so that correct behaviour is guaranteed in development, and recommend caching for production, but that's just me 😃

Resources

https://github.com/jeremyevans/roda#code-reloading

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions