Skip to content

Commit 33f1abe

Browse files
Remove internal non-collapsing lookup
We can't accurately track "origin miss" vs. "pop miss" without knowing the backend. We want to encourage lookups to be completed (i.e. transactional lookups) so we can provide accurate CHR metrics. This function is not exposed outside of internal/, and is not used by the public API; so, remove it.
1 parent d1404eb commit 33f1abe

File tree

1 file changed

+0
-37
lines changed

1 file changed

+0
-37
lines changed

internal/abi/fastly/httpcache_guest.go

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -218,43 +218,6 @@ type HTTPCacheHandle struct {
218218
h httpCacheHandle
219219
}
220220

221-
// witx:
222-
//
223-
// ;;; Perform a cache lookup based on the given request without participating in request
224-
// ;;; collapsing.
225-
// ;;;
226-
// ;;; The request is not consumed.
227-
// (@interface func (export "lookup")
228-
// (param $req_handle $request_handle)
229-
// (param $options_mask $http_cache_lookup_options_mask)
230-
// (param $options (@witx pointer $http_cache_lookup_options))
231-
// (result $err (expected $http_cache_handle (error $fastly_status)))
232-
// )
233-
//
234-
//go:wasmimport fastly_http_cache lookup
235-
//go:noescape
236-
func fastlyHTTPCacheLookup(
237-
h requestHandle,
238-
mask httpCacheLookupOptionsMask,
239-
opts prim.Pointer[httpCacheLookupOptions],
240-
cacheHandle prim.Pointer[httpCacheHandle],
241-
) FastlyStatus
242-
243-
func HTTPCacheLookup(req *HTTPRequest, opts *HTTPCacheLookupOptions) (*HTTPCacheHandle, error) {
244-
var h httpCacheHandle = invalidHTTPCacheHandle
245-
246-
if err := fastlyHTTPCacheLookup(
247-
req.h,
248-
opts.mask,
249-
prim.ToPointer(&opts.opts),
250-
prim.ToPointer(&h),
251-
).toError(); err != nil {
252-
return nil, err
253-
}
254-
255-
return &HTTPCacheHandle{h: h}, nil
256-
}
257-
258221
// witx:
259222
//
260223
// ;;; Perform a cache lookup based on the given request.

0 commit comments

Comments
 (0)