spring-projects / spring-data-redis

Provides support to increase developer productivity in Java when using Redis, a key-value store. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
https://spring.io/projects/spring-data-redis/
Apache License 2.0
1.76k stars 1.16k forks source link

Allow cache configuration from file [DATAREDIS-938] #1510

Open spring-projects-issues opened 5 years ago

spring-projects-issues commented 5 years ago

Christoph Strobl opened DATAREDIS-938 and commented

Add option to read cache configuration from properties file.

The idea ist to have one global (default) configuration file redis-cache.properties

locked: [true, false]
ttl: 100
nullValues: [true, false]
keyPrefix: [simple, none]
serializer: [raw, java, string, json]
key.serializer : [raw, java, string, json]
value.serializer : [raw, java, string, json]

and additional ones for individual caches person.redis-cache.properties that can alter the defaults.

ttl: 200

Reference URL: https://github.com/spring-projects/spring-boot/issues/19042

spring-projects-issues commented 4 years ago

Mark Paluch commented

That is rather an issue for Spring Boot. Our Redis cache doesn't seem to be used much without Boot. Shall we close this ticket?

spring-projects-issues commented 3 years ago

Mark Paluch commented

A good reason to provide file-based configuration by Spring Data Redis is that we would enable a uniform way to configure the cache API. By providing a schema we can validate the configuration and we don't rely on properties-driven development.

We would also align with the configuration mechanics of other Cache implementations. Note that there's a difference in what gets configured. While other Caches get fully configured (replication, eviction, sizing) by their config file, we have a config split. Eviction, replication, and sizing are configured directly in Redis. TTL, serializers, and such are client-side properties

spring-projects-issues commented 3 years ago

Christoph Strobl commented

As outlined by mark we moved the issue to backlog