3 ms·
I wonder how caching will work when the body has the potential to be huge? You could hash it to save on RAM, but I imagine that would get "expensive" at scale.
by packetlost 2y ago
I wonder how caching will work when the body has the potential to be huge? You could hash it to save on RAM, but I imagine that would get "expensive" at scale.
- cryptonym 2y agoA robust cache implementation would probably put a limit on request content-length, either denying the request or forwarding it as-is and bypassing cache.
- packetlost 2y agoI mean, yeah? The standard does say *MAY* cache content. It also says the cache server should try to do semantic interpretation of the body if possible, which I think is a misstep. IMO it would be better to have canonical representations of whatever format you're using and then let the cache layer rely on hashing or similar mechanisms. More complicated edge servers/proxies is not what we want because it leads to vulnerabilities.
- nine_k 2y agoHuge as in 50 kB? Fine. Huge as in 50 MB? Well, pass it through maybe if your NVMe device is running out of space.
- paulddraper 2y agohttps://en.wikipedia.org/wiki/Hash_function https://en.wikipedia.org/wiki/Hash_function