Sniffer icon indicating copy to clipboard operation
Sniffer copied to clipboard

API requests are not cached when using Sniffer

Open lukaszgieraltowski opened this issue 4 months ago • 0 comments

Hello,

I've encountered an issue where API requests are not being cached when using the Sniffer library to intercept network traffic in an iOS app.

Problem:

When Sniffer is enabled, even though the server responses include standard caching headers (such as Cache-Control, ETag, and Last-Modified), the requests are not cached by the URLSession as expected. Disabling Sniffer restores the expected caching behavior. I use standard caching policy without any customisations.

The server responses are correctly configured with caching headers, so without the Sniffer request are cached locally correctly.

Expected Behavior:

When using Sniffer, the URLSession should respect caching headers and cache responses as it does without Sniffer.

Any guidance on how to resolve this issue or workarounds would be greatly appreciated. Thank you!

lukaszgieraltowski avatar Oct 16 '24 13:10 lukaszgieraltowski