-
Notifications
You must be signed in to change notification settings - Fork 84
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
.cache() doesn't take header changes into account #73
Comments
Yes you are right. You will have to flush the cache file On Fri, Jun 19, 2015 at 10:54 AM, James F McMahon [email protected]
PG |
Thanks for the answer. If I get a chance I will take a look. For now I will just disable For now consider this an open feature request. |
👍 I ran into this today. It appears to not work regardless of using From my quick look it looks like the following needs to be done:
@pgherveou Can you confirm this? I may be able to hack a PR together... but my experience with gulp plugins is limited 😄. |
yes I think you got it all, the cache file could look like that and you would compare all keys with the file in the stream {
"<file.s3.path>": {
"etag": file.s3.etag,
"header1": "header1 value",
"header2": "header2 value"
}
} |
Hi, why don't you hash all headers in a single cache key? Poosh cache file stores 3 separate hash keys for each processed local file:
Each cache file line looks like this: {
"id":"url",
"c":"c5766b5257229169dfd571088341a817GZ", // content + gzip suffix
"h":"645dac9a", // HTTP headers
"r":"68227929" // specific remote options
} This is my Poosh function I use to hash headers and remote options: https://github.com/yvele/poosh/blob/master/packages/poosh-core/src/helpers/options/hash.js
|
When changing headers on objects the files are not republished if passed through
cache()
. For example, changing thecache-control
on an object result in the object being marked as "skipped" during thepublish()
call.Might be doing something wrong but it seems like this is an omission with the current behavior. Thoughts?
The text was updated successfully, but these errors were encountered: