You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Alexander Falb (JIRA)" <ji...@apache.org> on 2017/07/11 15:10:00 UTC

[jira] [Comment Edited] (DELTASPIKE-1277) Force refresh of cached config values

    [ https://issues.apache.org/jira/browse/DELTASPIKE-1277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16082350#comment-16082350 ] 

Alexander Falb edited comment on DELTASPIKE-1277 at 7/11/17 3:09 PM:
---------------------------------------------------------------------

(Uploaded central_caching.patch)

This is a first try of how a central cache could work. It is far from perfect, because of the dynamic nature of cache-keys containing projectstage and/or parameters. There are at least a dozen of unit tests missing covering all sorts of loading a projectstaged/parameterized keys, caching it, changing the other value, reloading it and so on, but I think this could be a start at least.

What do you think?


was (Author: elexx):
This is a first try of how a central cache could work. It is far from perfect, because of the dynamic nature of cache-keys containing projectstage and/or parameters. There are at least a dozen of unit tests missing covering all sorts of loading a projectstaged/parameterized keys, caching it, changing the other value, reloading it and so on, but I think this could be a start at least.

What do you think?

> Force refresh of cached config values
> -------------------------------------
>
>                 Key: DELTASPIKE-1277
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1277
>             Project: DeltaSpike
>          Issue Type: Improvement
>          Components: Configuration
>            Reporter: Alexander Falb
>         Attachments: central_caching.patch, forcerefresh.patch
>
>
> When using a {{TypedResolver}} or {{UntypedResolver}} with caching enabled, there is no way of bypassing the cache and forcefully reloading the value from underlying datasources.
> The attached patch is a proposal of creating such an mechanism. It introduces a {{void forceRefresh()}} method to the {{TypedResolver}}, implements this method by resetting the {{reloadAfter}} field and adds a unit test.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)