Skip to content

Commit

Permalink
updated query cache
Browse files Browse the repository at this point in the history
  • Loading branch information
bidi47 committed Mar 1, 2024
1 parent f5c8a37 commit 0f6f9b3
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Based on Enrico Zimuel's [Zend Expressive API - Skeleton example](https://github.com/ezimuel/zend-expressive-api), DotKernel API runs on [Laminas](https://github.com/laminas) and [Mezzio](https://github.com/mezzio) components and implements standards like PSR-3, PSR-4, PSR-7, PSR-11 and PSR-15.

![OSS Lifecycle](https://img.shields.io/osslifecycle/dotkernel/api)
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/api/4.3.0)
![PHP from Packagist (specify version)](https://img.shields.io/packagist/php-v/dotkernel/api/4.2.0)

[![GitHub issues](https://img.shields.io/github/issues/dotkernel/api)](https://github.com/dotkernel/api/issues)
[![GitHub forks](https://img.shields.io/github/forks/dotkernel/api)](https://github.com/dotkernel/api/network)
Expand Down
2 changes: 1 addition & 1 deletion src/Admin/src/Repository/AdminRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function getAdmins(array $filters = []): AdminCollection
->setFirstResult($page['offset'])
->setMaxResults($page['limit'])
->getQuery()
->useQueryCache(true);
->setCacheable(true);

return new AdminCollection($query, false);
}
Expand Down
2 changes: 1 addition & 1 deletion src/Admin/src/Repository/AdminRoleRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function getAdminRoles(array $filters = []): AdminRoleCollection
->setFirstResult($page['offset'])
->setMaxResults($page['limit'])
->getQuery()
->useQueryCache(true);
->setCacheable(true);

return new AdminRoleCollection($query, false);
}
Expand Down
4 changes: 2 additions & 2 deletions src/User/src/Repository/UserRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function findByResetPasswordHash(string $hash): ?User
->andWhere('resetPasswords.hash = :hash')
->setParameter('hash', $hash)
->getQuery()
->useQueryCache(true)
->setCacheable(true)
->getSingleResult();
} catch (Throwable) {
return null;
Expand Down Expand Up @@ -98,7 +98,7 @@ public function getUsers(array $filters = []): UserCollection
$qb->andWhere('roles.name = :role')->setParameter('role', $filters['role']);
}

$qb->getQuery()->useQueryCache(true);
$qb->getQuery()->setCacheable(true);

return new UserCollection($qb, false);
}
Expand Down
2 changes: 1 addition & 1 deletion src/User/src/Repository/UserRoleRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function getRoles(array $params = []): UserRoleCollection
->setFirstResult($page['offset'])
->setMaxResults($page['limit'])
->getQuery()
->useQueryCache(true);
->setCacheable(true);

return new UserRoleCollection($query, false);
}
Expand Down

0 comments on commit 0f6f9b3

Please sign in to comment.