egg-http-proxy icon indicating copy to clipboard operation
egg-http-proxy copied to clipboard

feat: cache

Open atian25 opened this issue 4 years ago • 5 comments

Checklist
  • [ ] npm test passes
  • [ ] tests and/or benchmarks are included
  • [ ] documentation is changed or added
  • [ ] commit message follows commit guidelines
Affected core subsystem(s)
Description of change

atian25 avatar Apr 12 '20 14:04 atian25

Codecov Report

Merging #7 into master will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master        #7   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         6    +1     
  Lines           88       118   +30     
=========================================
+ Hits            88       118   +30     
Impacted Files Coverage Δ
app/extend/application.js 100.00% <100.00%> (ø)
app/extend/context.js 100.00% <100.00%> (ø)
config/config.default.js 100.00% <100.00%> (ø)
lib/cache_manager.js 100.00% <100.00%> (ø)
lib/http_proxy.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 09dd217...178091b. Read the comment docs.

codecov[bot] avatar Apr 12 '20 14:04 codecov[bot]

LGTM;

DuanPengfei avatar Apr 15 '20 02:04 DuanPengfei

cache 处理遵守 http cache 规则会比较好,防止脏缓存出现。还可以加个 hook 由上层来决定缓存是否可使用。

killagu avatar Apr 15 '20 02:04 killagu

@killagu http cache 规则是指遵循 etag 这种吗?

DuanPengfei avatar Apr 15 '20 02:04 DuanPengfei

是的

killagu avatar Apr 19 '20 12:04 killagu