Skip to content
This repository was archived by the owner on Jul 12, 2024. It is now read-only.
This repository was 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

Description

@sbglasius

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions