mirror of
https://github.com/lukaszraczylo/graphql-monitoring-proxy.git
synced 2026-10-12 05:32:36 +00:00
Realign the structs to decrease memory footprint.
Add the timeout settings to address the connection drops.
This commit is contained in:
Vendored
+3
-3
@@ -9,15 +9,15 @@ import (
|
||||
)
|
||||
|
||||
type CacheEntry struct {
|
||||
Value []byte
|
||||
ExpiresAt time.Time
|
||||
Value []byte
|
||||
}
|
||||
|
||||
type Cache struct {
|
||||
sync.RWMutex
|
||||
bytePool sync.Pool
|
||||
entries sync.Map
|
||||
globalTTL time.Duration
|
||||
bytePool sync.Pool
|
||||
sync.RWMutex
|
||||
}
|
||||
|
||||
func New(globalTTL time.Duration) *Cache {
|
||||
|
||||
Reference in New Issue
Block a user