Increase API limit

This commit is contained in:
Hillel Coren 2018-05-15 16:18:44 +03:00
parent ef1551bc9a
commit 33e430a4d2

View File

@ -78,7 +78,7 @@ class ApiCheck
// http://stackoverflow.com/questions/1375501/how-do-i-throttle-my-sites-api-users // http://stackoverflow.com/questions/1375501/how-do-i-throttle-my-sites-api-users
$hour = 60 * 60; $hour = 60 * 60;
$hour_limit = $hasApiSecret ? 1000 : 100; // users are limited to 100 requests/hour (or 1000 for the mobile apps) $hour_limit = 1000;
$hour_throttle = Cache::get("hour_throttle:{$key}", null); $hour_throttle = Cache::get("hour_throttle:{$key}", null);
$last_api_request = Cache::get("last_api_request:{$key}", 0); $last_api_request = Cache::get("last_api_request:{$key}", 0);
$last_api_diff = time() - $last_api_request; $last_api_diff = time() - $last_api_request;