title: Store and retrieve data from coordinates in Redis
body: <p>I'm using Redis as a caching system to store data to avoid unnecessary consume on an API. What i was thinking is after get the result from the API, store the coordinate (as a key, for example) and the data on Redis and in a later search before consume the external api again, passing the a new coordinate check in Redis if matches with the saved coordinate (in meters, or anything) and if it matches, bring me the data stored.</p>
  
  <p>I already searched for at least 1 hour and could not find any relevant results that fits my needs. For example, <a href="https://redis.io/commands/geoadd" rel="nofollow noreferrer" title="GEOADD">GEOADD</a> could not help me because it doesn't expire automatically by Redis.</p>
  
  <p>The only solution would be storing the coordinates as key (example: <em>-51.356156,-50.356945</em>) with a json value, and check with a functional programming all the keys (coordinates) if it's matches with an other coordinate. But it seens not elegant, also with bad performance.</p>
  
  <p>Any ideas?</p>
  
  <p>I'm using Redis in NodeJS (Express).</p>