koopjs / koop-cache-memory

Deprecated
Other
0 stars 4 forks source link

Caching `/FeatureServer` and `/FeatureServer/layers` responses #14

Open apatriz opened 3 years ago

apatriz commented 3 years ago

https://github.com/koopjs/koop-cache-memory/blob/96eb8e1d96079f9cd1106b1fc8311e61652c5af8/src/index.js#L62

The above line assumes cached objects are always features. However, my getData function, returns {layers} , and this is a valid return value for koop-output-geoservices to handle. For requests to /FeatureServer and /FeatureServer/layers , the cached response is not retrieved properly due to the above (the features property will be assigned {layers}, which leads to errors in handling the geoJSON downstream).

rgwozdz commented 1 year ago

This should be fixed with https://github.com/koopjs/koop-cache-memory/pull/23.