Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

When configuring a cache both ttl and max capacity must be present #2

Open
sbglasius opened this issue Jun 9, 2021 · 0 comments
Open

Comments

@sbglasius
Copy link

If you configure a set of caches like this:

grails:
    cache:
        guava:
            defaultTtl: 300
            caches:
                demo:
                    maxCapacity: 10
                    ttl: 10
                cache1:
                    ttl: 10
                cache2:
                    maxCapacity: 20

it will fail on startup.

In the pull-request that I have submitted, it is possible to add defaultMaxCapacity, defaultAllowNullValues and allowNullValues for caches individually.

It will allow a the above configuration to be read, and also this:

grails:
    cache:
        guava:
            defaultTtl: 300
            defaultMaxCapacity: 2000
            caches:
                demo:
                    maxCapacity: 10
                    ttl: 10
                cache1:
                    ttl: 10
                cache2:
                    maxCapacity: 20
                cache3:
                    allowNullValues: false
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant