public function cleanup(DateTimeInterface $maxAge): void
    {
        $queryBuilder = $this->entityManager->createQueryBuilder();
        $queryBuilder->delete(CachedSearchResult::class, 'r')
                     ->andWhere('r.lastSearchTime < :maxAge')
                     ->setParameter('maxAge', $maxAge);

        $queryBuilder->getQuery()->execute();
    }