test: fix maxSnapshotCacheTtl when is infinite
This commit is contained in:
@@ -136,9 +136,11 @@ class ProjectionSnapshotRepositoryInRedis<E : Event<ID>, P : Projection<ID>, ID
|
|||||||
logger.error { "Projection NOT saved (already exists)" }
|
logger.error { "Projection NOT saved (already exists)" }
|
||||||
} else {
|
} else {
|
||||||
logger.info { "Projection saved" }
|
logger.info { "Projection saved" }
|
||||||
|
if (snapshotCacheConfig.maxSnapshotCacheTtl.isFinite()) {
|
||||||
jedis.expire(projection.redisKey, snapshotCacheConfig.maxSnapshotCacheTtl.inWholeSeconds)
|
jedis.expire(projection.redisKey, snapshotCacheConfig.maxSnapshotCacheTtl.inWholeSeconds)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply events to the projection.
|
* Apply events to the projection.
|
||||||
|
|||||||
Reference in New Issue
Block a user