As a user I would definitely prefer to control persistence through flag on
cache configuration. I do not even want to know what "memory policy" is.
E.g. CacheConfiguration.persistenceEnabled.

On Tue, Sep 12, 2017 at 12:24 PM, Alexey Goncharuk <
alexey.goncha...@gmail.com> wrote:

> Igniters,
>
> I am currently reviewing a change allowing to enable persistence on a
> per-memory-policy basis (thanks to K. Dudkov!) and have a question
> regarding the changes in configuration.
>
> The suggested change is to add a flag "persistenceEnabled" (defaults to
> true) to the memory policy configuration. To keep configuration
> compatibility, the logic is as follows:
>
> If PersistentStoreConfiguration is set, then only memory policies with
> persistenceEnabled=true flag will be persisted, which is consistent with
> the current behavior. To disable persistence, persistenceEnabled flag
> should be explicitly set to false.
>
> If PersistentStoreConfiguration is not set, then all caches are stored
> in-memory and persistenceEnabled is ignored.
>
> While personally, I like this change, I would like to check if there are
> any thoughts or objections to this approach.
>
> --
> Thanks,
> AG
>

Reply via email to