mirror of
https://github.com/status-im/eth-rpc-proxy.git
synced 2026-08-30 19:21:09 +00:00
feat(cache)_: add x-cache-level header
This commit is contained in:
@@ -43,7 +43,10 @@ func (s *Server) handleGet(w http.ResponseWriter, r *http.Request) {
|
||||
Fresh: result.Fresh,
|
||||
Data: result.Data,
|
||||
Key: result.Key,
|
||||
CacheType: result.CacheType,
|
||||
TTL: result.TTL,
|
||||
CacheStatus: cacheStatus,
|
||||
CacheLevel: result.CacheLevel,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -23,4 +23,5 @@ type CacheResponse struct {
|
||||
TTL int `json:"ttl,omitempty"`
|
||||
Error string `json:"error,omitempty"`
|
||||
CacheStatus models.CacheStatus `json:"cache_status,omitempty"` // HIT, MISS, or BYPASS
|
||||
CacheLevel models.CacheLevel `json:"cache_level,omitempty"` // L1, L2, or MISS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user