| @@ 204-207 (lines=4) @@ | ||
| 201 | ||
| 202 | // Redis cache |
|
| 203 | $cacheKey = "projectMetadata." . preg_replace("/[^A-Za-z0-9]/", '', $projectUrl); |
|
| 204 | if ($this->cache->hasItem($cacheKey)) { |
|
| 205 | $this->metadata = $this->cache->getItem($cacheKey)->get(); |
|
| 206 | return $this->metadata; |
|
| 207 | } |
|
| 208 | ||
| 209 | $api = MediawikiApi::newFromPage($projectUrl); |
|
| 210 | ||
| @@ 578-581 (lines=4) @@ | ||
| 575 | $userId = $user->getId($project); |
|
| 576 | $cacheKey = "automatedEdits.".$project->getDatabaseName().'.'.$userId; |
|
| 577 | $this->stopwatch->start($cacheKey, 'XTools'); |
|
| 578 | if ($this->cache->hasItem($cacheKey)) { |
|
| 579 | $this->log->debug("Using cache for $cacheKey"); |
|
| 580 | return $this->cache->getItem($cacheKey)->get(); |
|
| 581 | } |
|
| 582 | ||
| 583 | /** @var AutomatedEditsHelper $automatedEditsHelper */ |
|
| 584 | $automatedEditsHelper = $this->container->get("app.automated_edits_helper"); |
|