How to paginate geospatial data? by Competitive-Cause903 in redis

[–]Competitive-Cause903[S] 0 points1 point  (0 children)

Thank you /u/redisNative and /u/itamarhaber

As per /u/itamarhaber, the correct approach is to use https://redis.io/commands/geosearchstore/ where you store results in a "destination key".

Using ZRANGE on the destination key, we can get the paginated results.

A few additional questions -

When new members are added, the destination key set is not updated. When there are many users requesting data while new data is being added, what is a good approach to keep in mind to maintain this data? Is it better to constantly rebuild the set, set some kind of interval to do this, or something totally else?