benoitdm-oslandia / pg_featureserv

Apache License 2.0
1 stars 0 forks source link

Task - Cache data structure needs to be adapted for precondition headers using star value #142

Open nick-rv opened 2 years ago

nick-rv commented 2 years ago

Currently, there is a special case value "*" to manage for precondition headers like if-none-match / if-match.

This means that, each time we receive a request with this header set to "*" value, we have to retrieve from the database the weak etag associated with the feature concerned by the request. Then we are able to check if the weak etag is present into the cache or not.

To overcome this need, and to avoid unsuitable load on the database service in these use cases, we will have to change the current data structure which store the etag into the cache.

Maybe the map key could be built like "-", and then storing a struct as a value containing :