| @@ 72-86 (lines=15) @@ | ||
| 69 | /** |
|
| 70 | * @inheritdoc |
|
| 71 | */ |
|
| 72 | public function findCacheByRecord(Record $record) |
|
| 73 | { |
|
| 74 | ||
| 75 | if ($object = parent::findCacheByRecord($record)) { |
|
| 76 | return $object; |
|
| 77 | } |
|
| 78 | ||
| 79 | if (!$record instanceof RecordWithId) { |
|
| 80 | return null; |
|
| 81 | } |
|
| 82 | ||
| 83 | // Check if already in cache by id |
|
| 84 | return $this->findCacheById($record->id); |
|
| 85 | ||
| 86 | } |
|
| 87 | ||
| 88 | /** |
|
| 89 | * @inheritdoc |
|
| @@ 73-87 (lines=15) @@ | ||
| 70 | /** |
|
| 71 | * @inheritdoc |
|
| 72 | */ |
|
| 73 | public function findCacheByRecord(Record $record) |
|
| 74 | { |
|
| 75 | ||
| 76 | if ($model = parent::findCacheByRecord($record)) { |
|
| 77 | return $model; |
|
| 78 | } |
|
| 79 | ||
| 80 | if (!$record instanceof RecordWithId || null === $record->id) { |
|
| 81 | return null; |
|
| 82 | } |
|
| 83 | ||
| 84 | // Check if already in cache by id |
|
| 85 | return $this->findCacheById($record->id); |
|
| 86 | ||
| 87 | } |
|
| 88 | ||
| 89 | /** |
|
| 90 | * @inheritdoc |
|