update fix deadcode, security
This commit is contained in:
@@ -30,21 +30,6 @@ class TicketCachedRepository extends BaseCachedRepository implements TicketRepos
|
||||
return $this->ticketRepository->filter($data, $relationships, $withCount, $select);
|
||||
});
|
||||
}
|
||||
public function findWithRelationshipsByKey(string $key = '', string|int $value = '', array $relationships = [], array $withCount = [], array $withSum = [])
|
||||
{
|
||||
$cacheKey = $this->getCacheKey(md5(json_encode([
|
||||
'findWithRelationshipsByKey' => [
|
||||
'key' => $key,
|
||||
'value' => $value,
|
||||
'relationships' => $relationships,
|
||||
'withCount' => $withCount,
|
||||
'withSum' => $withSum,
|
||||
]
|
||||
])));
|
||||
return Cache::remember($cacheKey, $this->cacheTime, function () use ($key, $value, $relationships, $withCount, $withSum) {
|
||||
return $this->ticketRepository->findWithRelationshipsByKey($key, $value, $relationships, $withCount, $withSum);
|
||||
});
|
||||
}
|
||||
public function findBy(string $key = '', string $value)
|
||||
{
|
||||
$cacheKey = $this->getCacheKey(md5(json_encode([
|
||||
@@ -57,10 +42,4 @@ class TicketCachedRepository extends BaseCachedRepository implements TicketRepos
|
||||
return $this->ticketRepository->findBy($key, $value);
|
||||
});
|
||||
}
|
||||
public function updateBy(string $key = '', string $value = '', array $data = [])
|
||||
{
|
||||
$this->ticketRepository->updateBy($key, $value, $data);
|
||||
$this->clearCache();
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user