Service/Storage/DoctrineCache.php 1 location
|
@@ 46-56 (lines=11) @@
|
| 43 |
|
return $this->createRateInfo($info); |
| 44 |
|
} |
| 45 |
|
|
| 46 |
|
public function createRate($key, $limit, $period) |
| 47 |
|
{ |
| 48 |
|
$info = array(); |
| 49 |
|
$info['limit'] = $limit; |
| 50 |
|
$info['calls'] = 1; |
| 51 |
|
$info['reset'] = time() + $period; |
| 52 |
|
|
| 53 |
|
$this->client->save($key, $info, $period); |
| 54 |
|
|
| 55 |
|
return $this->createRateInfo($info); |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
public function resetRate($key) |
| 59 |
|
{ |
Service/Storage/Memcache.php 1 location
|
@@ 43-53 (lines=11) @@
|
| 40 |
|
return $this->createRateInfo($info); |
| 41 |
|
} |
| 42 |
|
|
| 43 |
|
public function createRate($key, $limit, $period) |
| 44 |
|
{ |
| 45 |
|
$info = array(); |
| 46 |
|
$info['limit'] = $limit; |
| 47 |
|
$info['calls'] = 1; |
| 48 |
|
$info['reset'] = time() + $period; |
| 49 |
|
|
| 50 |
|
$this->client->set($key, $info, $period); |
| 51 |
|
|
| 52 |
|
return $this->createRateInfo($info); |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
public function resetRate($key) |
| 56 |
|
{ |