Open Manfred opened 2 years ago
Let's start with implementing conditional requests with a cache backend and work from there.
From an HTTP consumer perspective there are two scenarios where you use conditional requests:
If-Modified-Since
and If-None-Match
request headersWhen you want a transparent cache (1) you may want to terminate TLS somewhere else and use a caching proxy internally so you can shared the cache easily across various instances of the consumer.
So the question is: is there sufficient value in keeping an application level cache (eg. Redis or Memcached) instead of using a caching proxy that was purposely built for this?
The answer is probably: yes, but then it has to be a drop-in setup with a very opinionated implementation.
In the second case (2) you will need to store your last-modified-at and etag values with the actual documents that were created based on HTTP responses and there is no reason for Reynard to get in the way.
The HTTP protocol has a number of features that require you to store bits of information between HTTP requests. We would like to support this somehow with a generic protocol that allows for different backends.