alibaba / alibaba/anyproxy

FR: 增加缓存配置项

Open
#492 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.9k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

#### The version of the AnyProxy

AnyProxy 4.1.0

#### Your expected behavior of AnyProxy
将 AnyProxy 作为其他程序的子功能组件进行使用时,往往需要限定文件读写范围。

希望缓存配置可以通过 options 参数传入。主要是配置缓存路径、是否启用缓存。

例如
```
const options = {
. . . . . .
cache: {
enable: true, //默认启用缓存
dir: '~/.anyproxy' //缓存目录路径
}
};
const proxyServer = new AnyProxy.ProxyServer(options);
```

#### The actual behavior of AnyProxy

目前,缓存配置无法通过 options 参数传入

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the AnyProxy.ProxyServer(options) entry point and trace how cache behavior is currently configured. Confirm how the cache enable flag and directory are handled, then use the existing test suite to verify both options are accepted and the configured path limits file writes.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.