-
Notifications
You must be signed in to change notification settings - Fork 521
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
Duplicate Requests when using cache key #1515
Comments
Can someone respond? I notice that this cache key feature is still not working as expected. |
My guess is that the server-side version is not running the cache extension for some reason. Do you see the one with the cache key first or the one without? |
@matthewp I see the one without first. Could it be something with my service (added here)? const ssr = require('done-ssr-middleware')
const path = require('path')
module.exports = ssr({
config: path.join(__dirname, '/package.json!npm'),
main: 'site-template/index.stache!done-autorender',
envs: {
'server-production': {
renderingBaseURL: '/dist',
baseURL: 'public',
bundlesPath: 'dist/bundles'
},
'server-development': {
baseURL: 'client'
}
}
}, {
strategy: 'seo',
xhrCache: false,
timeout: 30000
}) |
I think you need to add steal/src/cache-bust/cache-bust.js Line 10 in c9dd1eb
|
@matthewp when I do that I get this error in the console:
The index.js file is there. Here are the changes I made:
Also not sure why its there twice You have any thoughts? |
Oh yeah, I guess that makes sense, you don't want to do it that way. This might be specific to CSS and not a general issue with the cache extension. If you can, can you edit your node_modules/done-css/css.js file here: https://github.com/donejs/css/blob/30bf1b52a5c1bb7c1a1a96eadf8ddebceccda168/css.js#L65 And manually add the version just to see if that works? link.setAttribute("href", css.href + '?v=123'); |
@matthewp Yes, that worked. Unfortunately, I cannot deploy it with that. |
I'm looking into a possible fix. |
Couple of things:
|
I think the duplicate number is just a product of the test helpers being used in the tests. Not sure it's a real bug, so going to proceed with #2. |
Moving this to done-css. |
Moved here: donejs/css#66 |
Bug: When using cache key option, duplicate requests for the same css file (also using doneJS) one without the cache key and one with. In Production only. This Cache Key Feature.
Build doneJS project, Run in Production. Can also see this here: on my website in network
The text was updated successfully, but these errors were encountered: