You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We needed to purge objects by a surrogate key, and had the code shown in the image below (red). We were instantiating Fastly.new object, then calling get_service(), and then chaining purge_by_key(key). This usage ends up calling an API to get service every time for each purge, and we ended up exceeding rate limits for the API.
The solution is shown in green, and should probably be documented somewhere. Perhaps another class Purge should take care of executing these calls efficiently, given that all keys and api_keys are known ahead of time.
The text was updated successfully, but these errors were encountered:
We needed to purge objects by a surrogate key, and had the code shown in the image below (red). We were instantiating
Fastly.new
object, then callingget_service()
, and then chainingpurge_by_key(key)
. This usage ends up calling an API to get service every time for each purge, and we ended up exceeding rate limits for the API.The solution is shown in green, and should probably be documented somewhere. Perhaps another class
Purge
should take care of executing these calls efficiently, given that all keys and api_keys are known ahead of time.The text was updated successfully, but these errors were encountered: