| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| $cacheConfig = array_merge($cacheDefaults, $config['uniqueCache']); | ||
|
|
||
| Cache::setConfig('Cake/Queue.queueUnique', $cacheConfig); | ||
| $config['uniqueCacheKey'] = "Cake/Queue.queueUnique.{$key}"; |
There was a problem hiding this comment.
Couldn't this be put into the defaults so that userland code can define it if they really need to?
$cacheDefaults` = [
'duration' => '+24 hours',
'uniqueCacheKey' => "Cake/Queue.queueUnique.{$key}"
];
Sorry, something went wrong.
There was a problem hiding this comment.
The whole array nested under uniqueCache is passed directly through to Cache::setConfig(), so maybe that would be slightly confusing that uniqueCacheKey isn't part of the cache config? We could bump it up a level though and let it be configurable as part of the main config. So configuring the unique cache would look like this:
'uniqueCacheKey' => 'someCustomKey', // (optional)
'uniqueCache' => [
'engine' => 'File',
],
Sorry, something went wrong.
There was a problem hiding this comment.
maybe that would be slightly confusing that uniqueCacheKey isn't part of the cache config?
Yeah that would be odd. Lets roll with what you have so far. If we come up with use-cases that require custom cache key configuration control we can revisit then.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Prevents an exception when multiple configs are set with uniqueCache configured.
Fixes #113