Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Omit LAST_MODIFIED static header in templates when optimized is true #55

Closed
mark-vieira opened this issue Apr 4, 2017 · 6 comments
Closed

Comments

@mark-vieira
Copy link
Contributor

When using the optimized option in the Rocker compiler the hot reloading feature is disabled. Since the LAST_MODIFIED field in the compiled templates is only used for this purpose it should be omitted when this option is used. The use case here is that we want to cache these compiled templates and reuse the outputs in conjunction with Gradle build cache. Having different outputs for the same inputs breaks this capability. Currently we are manually stripping these fields out.

@jjlauer
Copy link
Member

jjlauer commented Apr 4, 2017 via email

@jjlauer
Copy link
Member

jjlauer commented Apr 11, 2017

@mark-vieira Took a look at what you suggested and I have a couple questions. First, the field LAST_MODIFIED doesn't exist -- did you mean MODIFIED_AT ? Second, that value is the "last modified" value from the source file itself. I guess my question is -- do you see that value change on your system if you didn't actually the underlying source file?

@mark-vieira
Copy link
Contributor Author

mark-vieira commented Apr 11, 2017

First, the field LAST_MODIFIED doesn't exist -- did you mean MODIFIED_AT

Doh, yes :)

I guess my question is -- do you see that value change on your system if you didn't actually the underlying source file?

Not for local development, but this value changes when doing things like fresh checkouts. So two CI builds using the same source will have different compiled output.

mark-vieira added a commit to mark-vieira/rocker that referenced this issue Apr 11, 2017
@mark-vieira
Copy link
Contributor Author

I've gone ahead and submitted pull request #58 to address this.

jjlauer added a commit that referenced this issue Apr 12, 2017
Pull request to address issue #55
@jjlauer
Copy link
Member

jjlauer commented Apr 12, 2017

@mark-vieira Excellent work. Pushed out v0.18.0 to maven central with your changes.

@jjlauer jjlauer closed this as completed Apr 12, 2017
@etiennestuder
Copy link

Awesome to have this released so quickly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants