Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Stefano Beretta 79 posts 223 karma points
    Nov 29, 2017 @ 10:24
    Stefano Beretta
    0

    Persistant cache(???) using ConfigurationHelper.Content

    Hi! First of all BEAUTIFUL PLUGIN!

    I have a question (maybe a bug? I really don't know)...

    I'm calling

    var nn = ConfigurationHelper.Content("my.node.key");

    in a SurfaceController.

    When I retrieve the children nn.Children() few rows after, the items returned change only if I rebuild my application

    and they don't when I publish(new or existing)/delete a node.

    If I use

    var ni = ConfigurationHelper.Value<int>("my.node.key"); var nd = Umbraco.TypedContent(ni).Children();

    the items returned change as I expected (everytime I publish/edit/delete a node).

    I guess if I'm doing something wrong and/or the plugin behave as expected.

    Thank you for this very useful plugin! H5YR!

    (and forgive my bad english)

  • Alex Skrypnyk 5444 posts 20377 karma points MVP 3x admin c-trib
    Dec 27, 2017 @ 12:07
    Alex Skrypnyk
    0

    Hi Stefano

    All data is stored in App_Data\uConfiguration\ folder in JSON format

    You can get setting value by key in several ways:

    For simple types (string, int, double, etc):

    ConfigurationHelper.Value<T>(string key)
    

    or

    ConfigurationHelper.Value<T>(string key, T defaultValue)
    

    Thanks,

    Alex

  • Alex Skrypnyk 5444 posts 20377 karma points MVP 3x admin c-trib
    Jan 14, 2018 @ 20:42
    Alex Skrypnyk
    0

    Hi Stefano

    Did you solve the issue? Please, share with community/

    Oleksandr

  • Troy Ross 1 post 92 karma points
    Aug 02, 2018 @ 00:36
    Troy Ross
    101

    ConfigurationHelper did not work in our environment until we specified the full namespace...hope this helps someone.

    Delete.uConfiguration.Core.Helpers.ConfigurationHelper.Value<string>("master.mytab.mypropertykey");

Please Sign in or register to post replies

Write your reply to:

Draft