Class PostgresCacheAutoConfiguration
java.lang.Object
org.fireflyframework.cache.config.PostgresCacheAutoConfiguration
@AutoConfiguration(after=org.fireflyframework.cache.config.CacheAutoConfiguration.class)
@ConditionalOnClass(name="io.r2dbc.spi.ConnectionFactory")
@ConditionalOnProperty(prefix="firefly.cache.postgres",
name="enabled",
havingValue="true")
@EnableConfigurationProperties(org.fireflyframework.cache.properties.CacheProperties.class)
public class PostgresCacheAutoConfiguration
extends Object
Auto-configuration for the PostgreSQL R2DBC cache provider.
Creates a pooled ConnectionFactory dedicated to cache storage and,
when firefly.cache.postgres.auto-create-schema is true,
provisions the cache table and a supporting expiry index. The resulting bean
(named fireflyCachePostgresConnectionFactory) is what the cache core
resolves reflectively into the provider context's
r2dbcConnectionFactory.
Configuration source: firefly.cache.postgres.* --
never spring.r2dbc.*.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionio.r2dbc.spi.ConnectionFactoryfireflyCachePostgresConnectionFactory(org.fireflyframework.cache.properties.CacheProperties properties) Creates the pooled R2DBCConnectionFactorythe cache adapter uses.
-
Constructor Details
-
PostgresCacheAutoConfiguration
public PostgresCacheAutoConfiguration()
-
-
Method Details
-
fireflyCachePostgresConnectionFactory
@Bean(name="fireflyCachePostgresConnectionFactory", destroyMethod="dispose") @ConditionalOnMissingBean(name="fireflyCachePostgresConnectionFactory") public io.r2dbc.spi.ConnectionFactory fireflyCachePostgresConnectionFactory(org.fireflyframework.cache.properties.CacheProperties properties) Creates the pooled R2DBCConnectionFactorythe cache adapter uses.
-