Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
spring-projects-issues opened this issue Feb 26, 2019 · 6 comments
Closed

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

spring-projects-issues opened this issue Feb 26, 2019 · 6 comments
Labels
has: design-decision An issue that contains a design decision about its topic status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement

Comments

@spring-projects-issues
Copy link

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: spring-projects/spring-boot#19042

@spring-projects-issues
Copy link
Author

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
Copy link
Author

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
Copy link
Author

Christoph Strobl commented

As outlined by mark we moved the issue to backlog

@spring-projects-issues spring-projects-issues added in: cache RedisCache and CacheManager status: ideal-for-contribution An issue that a contributor can help us with type: enhancement A general enhancement labels Dec 30, 2020
@injae-kim
Copy link

PR: #3059

@christophstrobl
Copy link
Member

Thank you @injae-kim for taking the time to work on this PR.
The original issue has been opened quite a while ago and Spring Boot already offers various configuration properties.

spring.cache.redis.cache-null-values=
spring.cache.redis.enable-statistics=
spring.cache.redis.key-prefix=
spring.cache.redis.time-to-live=
spring.cache.redis.use-key-prefix=

Since there's already some overlap we should consider if the existing configuration options are sufficient, what's missing and if, which project to extend.

@christophstrobl christophstrobl added status: waiting-for-triage An issue we've not yet triaged for: team-attention An issue we need to discuss as a team to make progress labels Dec 2, 2024
@mp911de
Copy link
Member

mp911de commented Jan 15, 2025

We discussed how to proceed here. Our cache comes from an API configuration side that is a lot simpler than what Infinispan or EhCache provide. We do not want to introduce a configuration file mechanism. Over time, it would us require supporting various dialects (XML, JSON, Yaml, …) and that is complexity we do not want to incorporate in our code.

@mp911de mp911de closed this as not planned Won't fix, can't repro, duplicate, stale Jan 15, 2025
@mp911de mp911de added status: declined A suggestion or change that we don't feel we should currently apply has: design-decision An issue that contains a design decision about its topic and removed status: ideal-for-contribution An issue that a contributor can help us with status: waiting-for-triage An issue we've not yet triaged in: cache RedisCache and CacheManager for: team-attention An issue we need to discuss as a team to make progress labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has: design-decision An issue that contains a design decision about its topic status: declined A suggestion or change that we don't feel we should currently apply type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants