@@ 117-126 (lines=10) @@ | ||
114 | /** |
|
115 | * @SuppressWarnings(PHPMD.ShortVariable) |
|
116 | */ |
|
117 | public function find($id, $columns = ['*']) |
|
118 | { |
|
119 | $tags = $this->getCacheTags(); |
|
120 | $key = $this->getCacheKey($columns, $id); |
|
121 | ||
122 | return $this->cache($tags) |
|
123 | ->rememberForever($key, function () use ($id, $columns) { |
|
124 | return parent::find($id, $columns); |
|
125 | }); |
|
126 | } |
|
127 | ||
128 | public function first($columns = ['*']) |
|
129 | { |
|
@@ 128-137 (lines=10) @@ | ||
125 | }); |
|
126 | } |
|
127 | ||
128 | public function first($columns = ['*']) |
|
129 | { |
|
130 | $tags = $this->getCacheTags(); |
|
131 | $key = $this->getCacheKey($columns); |
|
132 | ||
133 | return $this->cache($tags) |
|
134 | ->rememberForever($key, function () use ($columns) { |
|
135 | return parent::first($columns); |
|
136 | }); |
|
137 | } |
|
138 | ||
139 | public function get($columns = ['*']) |
|
140 | { |
|
@@ 139-148 (lines=10) @@ | ||
136 | }); |
|
137 | } |
|
138 | ||
139 | public function get($columns = ['*']) |
|
140 | { |
|
141 | $tags = $this->getCacheTags(); |
|
142 | $key = $this->getCacheKey($columns); |
|
143 | ||
144 | return $this->cache($tags) |
|
145 | ->rememberForever($key, function () use ($columns) { |
|
146 | return parent::get($columns); |
|
147 | }); |
|
148 | } |
|
149 | } |
|
150 |