Skalar / google_distance_matrix

Ruby client for The Google Distance Matrix API.
MIT License
57 stars 45 forks source link

Request caching not working #32

Closed aceunreal closed 7 years ago

aceunreal commented 7 years ago

It appears that with the changes done in https://github.com/Skalar/google_distance_matrix/pull/26 the caching of requests is no longer working.

After some investigation, this seems to be due to params being filtered and replaced with FILTERED.

When fetching from the cache, the key used does not contain FILTERED whereas when writing to the cache it does, resulting in constant cache miss.

I thought I would brought this to your attention

thhermansen commented 7 years ago

Thanks for reporting this.

I suspect the https://github.com/Skalar/google_distance_matrix/pull/26/files#diff-00ac01721677cc8e7dea20f6fcdd7614R21 when I looked over the pull request now. I'm not sure when I have time to look more in to this. Maybe in the easter, but I cannot promise anything.

thhermansen commented 7 years ago

@aceunreal - Could you please check out master and tell me if how it works? I'll release I new version if everything is ok.