improve reverse proxy and serverhandling

- buffer pool for IO copy
  - flush response after read, now works with event stream
  - fixed error handling for server
This commit is contained in:
yusing
2025-02-13 18:39:35 +08:00
parent 6bf4846ae8
commit 19e3392825
7 changed files with 132 additions and 116 deletions

View File

@@ -41,9 +41,7 @@ func NewCache() Cache {
// Release clear the contents of the Cached and returns it to the pool.
func (c Cache) Release() {
for _, k := range cacheKeys {
delete(c, k)
}
clear(c)
cachePool.Put(c)
}