webp-sh / webp_server_go

Go version of WebP Server. A tool that will serve your JPG/PNG/BMP/SVGs as WebP/AVIF format with compression, on-the-fly.
https://docs.webp.sh
GNU General Public License v3.0
1.83k stars 175 forks source link

A better way to handle remote content-type, fix etag #216

Closed n0vad3v closed 1 year ago

n0vad3v commented 1 year ago
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
codecov[bot] commented 1 year ago

Codecov Report

Merging #216 (f3e9976) into master (9efead2) will decrease coverage by 3.24%. The diff coverage is 77.81%.

@@            Coverage Diff             @@
##           master     #216      +/-   ##
==========================================
- Coverage   83.57%   80.34%   -3.24%     
==========================================
  Files           6        6              
  Lines         542      636      +94     
==========================================
+ Hits          453      511      +58     
- Misses         61       85      +24     
- Partials       28       40      +12     
Impacted Files Coverage Δ
encoder.go 67.03% <68.88%> (-10.11%) :arrow_down:
helper.go 82.35% <74.60%> (-6.42%) :arrow_down:
router.go 93.16% <95.00%> (+3.47%) :arrow_up:
config.go 100.00% <100.00%> (ø)
prefetch.go 100.00% <100.00%> (ø)
webp-server.go 79.20% <100.00%> (+2.03%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
bugfest commented 1 year ago

HI @n0vad3v, I've being thinking about how to improve the cache; here you're using go-cache for the in-memory locking but I was wondering if we could take the opportunity to use it thru the gocache wrapper instead: https://github.com/eko/gocache#memory-using-go-cache

That way we could extend the server to use other caching services in the future more easily.

github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
n0vad3v commented 1 year ago

@bugfest

I was wondering if we could take the opportunity to use it thru the gocache wrapper instead

Agree with you, however I'm keep using this in this PR right now as we only have this one item to cache and trying to fix the problem in issue: https://github.com/webp-sh/webp_server_go/issues/213

I've also edited https://github.com/webp-sh/webp_server_go/issues/217 to add this potential feature.

github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)
github-actions[bot] commented 1 year ago

ghcr.io/webp-sh/webp_server_go (debian 11.7)
============================================
Total: 0 (HIGH: 0, CRITICAL: 0)