@@ -41,7 +41,7 @@ Regardless of the CacheEngine you choose to use, your application interacts with
4141
4242### Cache::setConfig()
4343
44- ` static ` Cake\\ Cache\\ Cache::** setConfig** ($key, $config = null): void
44+ ` static ` Cake\\ Cache\\ Cache::** setConfig** (array|string $key, $config = null): void
4545
4646Your application can configure any number of 'engines' during its bootstrap
4747process. Cache engine configurations are defined in ** config/app.php** .
@@ -269,7 +269,7 @@ When there is no fallback cache failures will be raised as exceptions.
269269
270270### Cache::drop()
271271
272- ` static ` Cake\\ Cache\\ Cache::** drop** ($key): bool
272+ ` static ` Cake\\ Cache\\ Cache::** drop** (string $key): bool
273273
274274Once a configuration is created you cannot change it. Instead you should drop
275275the configuration and re-create it using ` Cake\Cache\Cache::drop() ` and
@@ -280,7 +280,7 @@ the config and destroy the adapter if it was constructed.
280280
281281### Cache::write()
282282
283- ` static ` Cake\\ Cache\\ Cache::** write** ($key, $value, $config = 'default'): bool
283+ ` static ` Cake\\ Cache\\ Cache::** write** (string $key, mixed $value, string $config = 'default'): bool
284284
285285` Cache::write() ` will write a \$ value to the Cache. You can read or
286286delete this value later by referring to it by ` $key ` . You may
@@ -307,7 +307,7 @@ of trips made to the database to fetch posts.
307307
308308### Cache::writeMany()
309309
310- ` static ` Cake\\ Cache\\ Cache::** writeMany** ($data, $config = 'default'): bool
310+ ` static ` Cake\\ Cache\\ Cache::** writeMany** (iterable $data, string $config = 'default'): bool
311311
312312You may find yourself needing to write multiple cache keys at once. While you
313313can use multiple calls to ` write() ` , ` writeMany() ` allows CakePHP to use
@@ -349,7 +349,7 @@ Cache::delete($lockKey);
349349
350350### Cache::remember()
351351
352- ` static ` Cake\\ Cache\\ Cache::** remember** ($key, $callable, $config = 'default'): mixed
352+ ` static ` Cake\\ Cache\\ Cache::** remember** (string $key, Closure $callable, string $config = 'default'): mixed
353353
354354Cache helps with read-through caching. If the named cache key exists,
355355it will be returned. If the key does not exist, the callable will be invoked
@@ -374,7 +374,7 @@ class IssueService
374374
375375### Cache::read()
376376
377- ` static ` Cake\\ Cache\\ Cache::** read** ($key, $config = 'default'): mixed
377+ ` static ` Cake\\ Cache\\ Cache::** read** (string $key, string $config = 'default'): mixed
378378
379379` Cache::read() ` is used to read the cached value stored under
380380` $key ` from the ` $config ` . If ` $config ` is null the default
@@ -419,7 +419,7 @@ return $cloud;
419419
420420### Cache::readMany()
421421
422- ` static ` Cake\\ Cache\\ Cache::** readMany** ($keys, $config = 'default'): iterable
422+ ` static ` Cake\\ Cache\\ Cache::** readMany** (iterable $keys, string $config = 'default'): iterable
423423
424424After you've written multiple keys at once, you'll probably want to read them as
425425well. While you could use multiple calls to ` read() ` , ` readMany() ` allows
@@ -439,7 +439,7 @@ $result = Cache::readMany([
439439
440440### Cache::delete()
441441
442- ` static ` Cake\\ Cache\\ Cache::** delete** ($key, $config = 'default'): bool
442+ ` static ` Cake\\ Cache\\ Cache::** delete** (string $key, string $config = 'default'): bool
443443
444444` Cache::delete() ` will allow you to completely remove a cached
445445object from the store:
@@ -458,7 +458,7 @@ Cache::pool('redis')->deleteAsync('my_key');
458458
459459### Cache::deleteMany()
460460
461- ` static ` Cake\\ Cache\\ Cache::** deleteMany** ($keys, $config = 'default'): bool
461+ ` static ` Cake\\ Cache\\ Cache::** deleteMany** (iterable $keys, string $config = 'default'): bool
462462
463463After you've written multiple keys at once, you may want to delete them. While
464464you could use multiple calls to ` delete() ` , ` deleteMany() ` allows CakePHP to use
@@ -478,7 +478,7 @@ $result = Cache::deleteMany([
478478
479479### Cache::clear()
480480
481- ` static ` Cake\\ Cache\\ Cache::** clear** ($config = 'default'): bool
481+ ` static ` Cake\\ Cache\\ Cache::** clear** (string $config = 'default'): bool
482482
483483Destroy all cached values for a cache configuration. In engines like: Apcu,
484484Memcached, the cache configuration's prefix is used to remove
@@ -505,11 +505,11 @@ Cache::pool('redis')->clearBlocking();
505505
506506### Cache::increment()
507507
508- ` static ` Cake\\ Cache\\ Cache::** increment** ($key, $offset = 1, $config = 'default'): int|false
508+ ` static ` Cake\\ Cache\\ Cache::** increment** (string $key, int $offset = 1, string $config = 'default'): int|false
509509
510510### Cache::decrement()
511511
512- ` static ` Cake\\ Cache\\ Cache::** decrement** ($key, $offset = 1, $config = 'default'): int|false
512+ ` static ` Cake\\ Cache\\ Cache::** decrement** (string $key, int $offset = 1, string $config = 'default'): int|false
513513
514514Counters in your application are good candidates for storage in a cache. As an
515515example, a simple countdown for remaining 'slots' in a contest could be stored
@@ -563,7 +563,7 @@ Cache::setConfig('site_home', [
563563
564564### Cache::clearGroup()
565565
566- ` method ` Cake\\ Cache\\ Cache::** clearGroup** ($group, $config = 'default'): bool
566+ ` static ` Cake\\ Cache\\ Cache::** clearGroup** (string $group, string $config = 'default'): bool
567567
568568Let's say you want to store the HTML generated for your homepage in cache, but
569569would also want to automatically invalidate this cache every time a comment or
@@ -586,7 +586,7 @@ public function afterSave($event, $entity, $options = [])
586586
587587### Cache::groupConfigs()
588588
589- ` static ` Cake\\ Cache\\ Cache::** groupConfigs** ($group = null): array
589+ ` static ` Cake\\ Cache\\ Cache::** groupConfigs** (?string $group = null): array
590590
591591` groupConfigs() ` can be used to retrieve mapping between group and
592592configurations, i.e.: having the same group:
0 commit comments