Skip to content

Caching Collision / lat-lng signs ignored #203

@valentin-dufois

Description

@valentin-dufois

Hey,

I just encountered this bug today. When making a reverse geocoding request, the way the cache key is being built drops the sign of the latitude and longitude. This means that a request being made for a user that forgot a minus sign will be cached, and this cached entry will be returned for a request that includes the minus sign.

$geocoder->reverse(-45.473282, -73.834721);
// Cache key -> "45473282-73834721"

$geocoder->reverse(45.473282, 73.834721);
// Cache key -> "45473282-73834721"

Current solution I applied for now is to disable caching for reverse geocoding requests, but this is a temporary measure.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions