PostgresStore

constructor(dataSource: DataSource, table: String = "kmemo_cache", ttl: Duration? = null, clock: Clock = Clock.systemUTC())

Parameters

dataSource

a pooled Postgres DataSource; the Postgres JDBC driver is the caller's dependency.

table

table name (validated as a plain identifier, since it is interpolated into SQL).

ttl

how long an entry stays valid, or null to keep it until removed.

clock

time source; substitute a fixed clock in tests instead of sleeping.