@@ -131,11 +131,11 @@ discard block |
||
| 131 | 131 | } |
| 132 | 132 | |
| 133 | 133 | /** |
| 134 | - * @param string $cacheKey |
|
| 135 | - * @param int $amount |
|
| 136 | - * @param string $namespace |
|
| 137 | - * @return bool |
|
| 138 | - */ |
|
| 134 | + * @param string $cacheKey |
|
| 135 | + * @param int $amount |
|
| 136 | + * @param string $namespace |
|
| 137 | + * @return bool |
|
| 138 | + */ |
|
| 139 | 139 | public function increment(string $cacheKey, int $amount = 1, string $namespace = '') |
| 140 | 140 | { |
| 141 | 141 | $cacheData = $this->getCache($cacheKey, $namespace); |
@@ -150,20 +150,20 @@ discard block |
||
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | /** |
| 153 | - * @param string $cacheKey |
|
| 154 | - * @param int $amount |
|
| 155 | - * @param string $namespace |
|
| 156 | - * @return bool |
|
| 157 | - */ |
|
| 153 | + * @param string $cacheKey |
|
| 154 | + * @param int $amount |
|
| 155 | + * @param string $namespace |
|
| 156 | + * @return bool |
|
| 157 | + */ |
|
| 158 | 158 | public function decrement(string $cacheKey, int $amount = 1, string $namespace = '') |
| 159 | 159 | { |
| 160 | - return $this->increment($cacheKey, ($amount * -1), $namespace); |
|
| 160 | + return $this->increment($cacheKey, ($amount * -1), $namespace); |
|
| 161 | 161 | } |
| 162 | 162 | /** |
| 163 | - * @param string $cacheKey |
|
| 164 | - * @param mixed $cacheData |
|
| 165 | - * @return void |
|
| 166 | - */ |
|
| 163 | + * @param string $cacheKey |
|
| 164 | + * @param mixed $cacheData |
|
| 165 | + * @return void |
|
| 166 | + */ |
|
| 167 | 167 | public function forever(string $cacheKey, mixed $cacheData) |
| 168 | 168 | { |
| 169 | 169 | $this->putCache($cacheKey, $cacheData, ttl: 31536000 * 1000); |
@@ -171,11 +171,11 @@ discard block |
||
| 171 | 171 | } |
| 172 | 172 | |
| 173 | 173 | /** |
| 174 | - * @param string $cacheKey |
|
| 175 | - * @param int|string $ttl |
|
| 176 | - * @param Closure $callback |
|
| 177 | - * @return mixed |
|
| 178 | - */ |
|
| 174 | + * @param string $cacheKey |
|
| 175 | + * @param int|string $ttl |
|
| 176 | + * @param Closure $callback |
|
| 177 | + * @return mixed |
|
| 178 | + */ |
|
| 179 | 179 | public function remember(string $cacheKey, int|string $ttl, Closure $callback) |
| 180 | 180 | { |
| 181 | 181 | $cachedData = $this->getCache($cacheKey, ttl: $ttl); |
@@ -192,20 +192,20 @@ discard block |
||
| 192 | 192 | } |
| 193 | 193 | |
| 194 | 194 | /** |
| 195 | - * @param string $cacheKey |
|
| 196 | - * @param Closure $callback |
|
| 197 | - * @return mixed |
|
| 198 | - */ |
|
| 195 | + * @param string $cacheKey |
|
| 196 | + * @param Closure $callback |
|
| 197 | + * @return mixed |
|
| 198 | + */ |
|
| 199 | 199 | public function rememberForever(string $cacheKey, Closure $callback) |
| 200 | 200 | { |
| 201 | 201 | return $this->remember($cacheKey, 31536000 * 1000, $callback); |
| 202 | 202 | } |
| 203 | 203 | |
| 204 | 204 | /** |
| 205 | - * @param string $cacheKey |
|
| 206 | - * @param string $namespace |
|
| 207 | - * @return mixed |
|
| 208 | - */ |
|
| 205 | + * @param string $cacheKey |
|
| 206 | + * @param string $namespace |
|
| 207 | + * @return mixed |
|
| 208 | + */ |
|
| 209 | 209 | public function getAndForget(string $cacheKey, string $namespace = '') |
| 210 | 210 | { |
| 211 | 211 | $cachedData = $this->getCache($cacheKey, $namespace); |
@@ -219,12 +219,12 @@ discard block |
||
| 219 | 219 | } |
| 220 | 220 | |
| 221 | 221 | /** |
| 222 | - * @param string $cacheKey |
|
| 223 | - * @param mixed $cacheData |
|
| 224 | - * @param string $namespace |
|
| 225 | - * @param int|string $ttl |
|
| 226 | - * @return bool |
|
| 227 | - */ |
|
| 222 | + * @param string $cacheKey |
|
| 223 | + * @param mixed $cacheData |
|
| 224 | + * @param string $namespace |
|
| 225 | + * @param int|string $ttl |
|
| 226 | + * @return bool |
|
| 227 | + */ |
|
| 228 | 228 | public function add(string $cacheKey, mixed $cacheData, string $namespace = '', int|string $ttl = 3600) |
| 229 | 229 | { |
| 230 | 230 | if (!empty($this->getCache($cacheKey, $namespace))) { |