-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Response caching #186
Comments
Does it make sense to cache isochrones? You would need to round the lat/lng for a cache key that makes sense, and that might cause issues for some use cases (e.g. if you're generating isochrones in a small area within a city, and you move the isochrone origin even a small amount, I'd expect the isochrone to change a little bit; but if it were cached with decreased accuracy coordinates then it wouldn't always change). I personally would hesitate to use Galton if it forced me to adopt Redis as a dependency just to cache isochrones -- for what we use Galton for, caching would not be helpful. |
You make a valid point, and ideally the caching middleware would be optional. It might just be best to pass on this feature request altogether and move caching external to this project. E.g. By using Varnish or an external microservice with the sole purpose of building a cache. |
We'd need heavy response caching based on the lat/lng since they take quite a while to compute (up to 5s) for a certain coordinate pair.
Would you be up to review a PR containing https://github.com/coderhaoxin/koa-redis-cache?
Or do you have any other suggestions pertaining to result caching?
The text was updated successfully, but these errors were encountered: