geolocation api rate-limit: improve the delay mechanism to be sure to don't hit provider more than 1 time/s, add memory-cache to save response data.

This commit is contained in:
sedum
2023-01-19 01:29:24 +01:00
parent ebb3fcbd93
commit 6ee96fb07c
5 changed files with 115 additions and 67 deletions

View File

@@ -7950,6 +7950,11 @@ memoizee@^0.4.15:
next-tick "^1.1.0"
timers-ext "^0.1.7"
memory-cache@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/memory-cache/-/memory-cache-0.2.0.tgz#7890b01d52c00c8ebc9d533e1f8eb17e3034871a"
integrity sha512-OcjA+jzjOYzKmKS6IQVALHLVz+rNTMPoJvCztFaZxwG14wtAW7VRZjwTQu06vKCYOxh4jVnik7ya0SXTB0W+xA==
memory-fs@^0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552"