private function cacheGc() {
    $probMax = 1 / self::GC_PROB;
    $do = rand(1, $probMax);
    if($do > 1) {
      /* Skipping GC this time. */
      return false;
    }
    $cahceIds = $this->store->listIds('cache');
    foreach($cahceIds as $cahceId) {
      try {
        $data = $this->store->read('cache', $cahceId);
      } catch (\phpSec\Exception $e) {
        /* Skip this. */
        continue;
      }

      if($data['ttl'] < time()) {
        $this->store->delete('cache', $cahceId);
      }
    }
    return true;
  }