DictionaryBundle icon indicating copy to clipboard operation
DictionaryBundle copied to clipboard

Add a Cache decorator for any kind of dictionary

Open AntoineLelaisant opened this issue 6 years ago • 0 comments

What about creating a configuration parameter that would allows to wrap the dictionary inside a Cache decorator ?

The config would looks like:

dictionaries:
    my_dictionary:
        type: key_value
        content:
            - foo: 'BAR'
            - bar: 'BAZ'
        cache: true

By default this parameter would be set to true, but when activated, it put the compiled content of the dictionary in the application cache.

This is probably pointless with the example above but could make sense with combine or callable dictionaries.

AntoineLelaisant avatar Oct 23 '18 11:10 AntoineLelaisant