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
Issue #931 fix for not allowing caching #1050
Conversation
Looks good ! |
@dherault any issues with the PR? |
@dl748 not at all, thanks for the PR, I'm taking a look |
Looks good, maybe make it an option ? |
@dherault isn't it an option? Thats what allowCache: true does ? |
please can we have hot reloading so I can upgrade serverless-offline from 5.12 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's debatable if the default for allowCache
should be true
to align with the existing behaviour or false
, so people don't have to actively opt-out (which the majority probably wants). Otherwise looks good.
@stephledev I would think as a tool used mainly for developers, the default should be cache is off. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @dl748 ,
I like this PR that solves a big issue,
Can you please add some documentation and option help?
Thanks,
@dherault Updated, unless you want more documentation and cli information than that. |
Thanks! v6.7.0! |
@dl748 I face an error with |
@jer-sen, i'd have to see your specific code, most likely you, or a package you are using is, using global variables. |
This PR made my app start crashing when running with Serverless offline. Might be some combination with serverless-webpack. Everything works when I set the plugins:
Some of the stacktrace:
|
@dl748 yes I'm using Apollo Server and a MongoDB persistent connection with |
I am also having issues with reloading. If However, more importantly, this crashes any normal JS module with Is there a way to prevent reloading stuff in a project's |
Fix for Issue #931 (I tested it out with the webpack plugin to verify)
Added module clear-module, to remove the module that the handler is in, from cache, from every request. Caching can be turned back on using "allowCache" = true in the configuration options
I think the options should be passed to every runner, but it seems some options are nitpicked from the options and passed into the runners. I did the same for consistancy.