Skip to content

Conversation

@Dong-Gao
Copy link

@Dong-Gao Dong-Gao commented Aug 6, 2020

add cache option
the default/missing cache value is false, which means it does not store response body on local disk, so no longer worry about too much disk usage; when cache is false, the webinterface is forced to disable

If you want to keep local cache, e.g the webInterface is needed, you can also set cache value to true

const options = {
  port: 8001,
  cache: false
};

const proxyServer = new AnyProxy.ProxyServer(options);

@CLAassistant
Copy link

CLAassistant commented Aug 6, 2020

CLA assistant check
All committers have signed the CLA.

if (!('cache' in config)) {
config.cache = true;
}
const recorder = config.cache ? new Recorder() : { fake: true };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

试试这种模式:

config.recorderDiskCache  ? new Recorder() : new Recorder({diskCache: false});

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