mirror of
https://github.com/coredns/coredns.git
synced 2025-10-28 00:34:24 -04:00
Make request.Request smaller (#3351)
* Make request.Request smaller This makes the request struct smaller and removes the pointer to the do boolean (tri-bool) as size == 0 will indicate if we have cached it. Family can be a int8 because it only carries 3 values, Size itself is just a uint16 under the covers. This is a more comprehensive fix than #3292 Closes #3292 Signed-off-by: Miek Gieben <miek@miek.nl> * cache: fix test this now needs a valid response writter Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
2
plugin/cache/cache_test.go
vendored
2
plugin/cache/cache_test.go
vendored
@@ -191,7 +191,7 @@ func TestCache(t *testing.T) {
|
||||
m := tc.in.Msg()
|
||||
m = cacheMsg(m, tc)
|
||||
|
||||
state := request.Request{W: nil, Req: m}
|
||||
state := request.Request{W: &test.ResponseWriter{}, Req: m}
|
||||
|
||||
mt, _ := response.Typify(m, utc)
|
||||
valid, k := key(state.Name(), m, mt, state.Do())
|
||||
|
||||
Reference in New Issue
Block a user