Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Thunder SDK Caches Configurable #235

Open
adamdama opened this issue Sep 19, 2023 · 1 comment
Open

Make Thunder SDK Caches Configurable #235

adamdama opened this issue Sep 19, 2023 · 1 comment

Comments

@adamdama
Copy link
Contributor

The thunder_ripple_sdk has caching implemented around all of the device_info calls that are made to Thunder. This will make testing or local development with the Mock Device extension very difficult as there is no way to clear the cache after the first call of any particular method is made.

We need to add the ability to disable this cache in certain environments. This should be done by updating the extn manifest to have a property which enables or disables this cache.

I am not sure what the best way to express this is in the extn manifest file as this property would be generic to this specific extension. It also doesn't seem right to place the config in the device manifest. Maybe we need to have a settings field in the extn manifest where extensions can define their own options.

@satlead
Copy link
Collaborator

satlead commented Sep 19, 2023

Right now we have a config field in the extension manifest for such requirements.
Here is an example

A distributor can set the

{
            "path": "libthunder",
            "symbols": [
                {
                    "id": "ripple:channel:device:thunder",
                    "config": {
                         "disable_device_info_caching": true
                     }
                    "uses": [
                        "config"
                    ],
                    "fulfills": [
                        "device_info",
                        "window_manager",
                        "browser",
                        "wifi",
                        "device_events",
                        "device_persistence",
                        "remote_accessory"
                    ]
                }
            ]
        },

Then one can do extn_client.get_bool_config("disable_device_info_caching")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants