Data stored in the cache has been mutable. If you send GeoJSON to the memory cache, it gets stored, but it appears that some post-caching, koop-triggered transformations have the ability to mutate the GeoJSON while it is in the cache. This mutating breaks some functionality, because the cached feature data is suppose to be immutable.
This PR:
Makes cached data immutable from outside the cache-plugin by deep cloning data prior to caching
Refactors the cache class so that it no longer uses deprecated Util.inherits
Moves catalog methods outside of prototype catalog namespace; this avoids context confusion with this. (Technically this is a breaking change, but note that Koop-core does not directly use these changed catalog methods
Data stored in the cache has been mutable. If you send GeoJSON to the memory cache, it gets stored, but it appears that some post-caching, koop-triggered transformations have the ability to mutate the GeoJSON while it is in the cache. This mutating breaks some functionality, because the cached feature data is suppose to be immutable.
This PR:
Util.inherits
catalog
namespace; this avoids context confusion withthis
. (Technically this is a breaking change, but note that Koop-core does not directly use these changed catalog methods