Skip to content

Add validation for cache model#59

Closed
marki1an wants to merge 1 commit intoprebid:masterfrom
marki1an:add-cache-model-validation
Closed

Add validation for cache model#59
marki1an wants to merge 1 commit intoprebid:masterfrom
marki1an:add-cache-model-validation

Conversation

@marki1an
Copy link
Copy Markdown
Collaborator

My proposal validates the cache model.

Was configuring for single-node Redis.

 spring:
   redis:   
     host: host
     timeout: value
     port: value

spring:
  redis:
    cluster:
      nodes:
        - host_1:port_1
        - host_2:port_2
        - host_3:port_3
    timeout: 300

Actual for a single-node

 spring:
   redis:  
      single-node:    
        host: host
        timeout: value
        port: value

and for cluster

 spring:
   redis:  
      cluster:    
         nodes:
          - host_1:port_1
          - host_2:port_2
          - host_3:port_3
         timeout: 300

@marki1an marki1an requested a review from SerhiiNahornyi April 20, 2022 08:34
@Repository
@Slf4j
@ConditionalOnProperty(prefix = "spring.redis", name = {"timeout"})
@Conditional(ValidateRedisPropertyConditional.class)
Copy link
Copy Markdown
Collaborator

@And1sS And1sS Apr 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not simple @ConditionOnExpression? Just to make it look cleaner?

@marki1an marki1an closed this May 4, 2022
@marki1an
Copy link
Copy Markdown
Collaborator Author

marki1an commented May 4, 2022

Corresponding PR : #63

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants