$this->getUniqueJobCacheStore($job), 'laravel_unique_job_key' => UniqueLock::getKey($job), ]); } } /** * Remove the unique job information from the context. * * @param mixed $job * @return void */ public function removeUniqueJobInformationFromContext($job): void { if ($job instanceof ShouldBeUnique) { Context::forgetHidden([ 'laravel_unique_job_cache_store', 'laravel_unique_job_key', ]); } } /** * Determine the cache store used by the unique job to acquire locks. * * @param mixed $job * @return string|null */ protected function getUniqueJobCacheStore($job): ?string { return method_exists($job, 'uniqueVia') ? $job->uniqueVia()->getName() : config('cache.default'); } }