[8.x] Dont recompile view if lastModified is same as cache file #38270
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.