Skip to content

[8.x] Dont recompile view if lastModified is same as cache file #38270

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

Closed
wants to merge 1 commit into from
Closed

[8.x] Dont recompile view if lastModified is same as cache file #38270

wants to merge 1 commit into from

Conversation

Jimbolino
Copy link
Contributor

This small change fixes an issue i encountered when running laravel via serverless framework on aws lambda.

https://github.com/brefphp/laravel-bridge/blob/master/src/BrefServiceProvider.php#L65
I dont like the above workaround, because it forces blade templates to be recompiled every time, which defeats the purpose of caching.

But when including the storage (or any other) directory in the serverless.zip, i noticed that all dates in the zip file were set to 01-01-1980
This was not a bug, but a feature to create reproducible builds/zip files:
https://github.com/serverless/serverless/blob/master/lib/plugins/package/lib/zipService.js#L95

When searching i found some PR's that touched the subject:
#13938 (comment)
#31206

I believe this PR could fix all these edge cases, without drastically changing the caching behaviour.

dont recompile view if .blade.php has same mtime as cache file
@taylorotwell
Copy link
Member

I don't think I can change this on a patch release.

@GrahamCampbell
Copy link
Member

This change looks sensible to me. Also would affect vapor deploys?

@GrahamCampbell
Copy link
Member

Actually, no, vapor builds views into tmp.

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

Successfully merging this pull request may close these issues.

3 participants