mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Updated Design: Persistable Context (markdown)
parent
843add386a
commit
6a57a29281
@ -149,3 +149,23 @@ flow.get("foo.bar"); // return 1
|
||||
> HU: Persistable Context do not support this.
|
||||
> If there are some problems, we will consider how solve those.
|
||||
>> DCJ - Agreed for version 1.
|
||||
|
||||
* key name of default storage
|
||||
|
||||
In the case that `file` is not declared but `default` is declared on contextStorage, if a context data is specified like `$file.count`, Node-RED stores the key name in the default storage.
|
||||
In this case, there are two options for storing the key name.
|
||||
1. `$file.count` (The whole name that a user specified)
|
||||
|
||||
Pros: Name confliction can be avoided.
|
||||
|
||||
Cons: The rule will become complicated especially when a user directly accesses to the context data (e.g. on redis).
|
||||
|
||||
2. `count` (The key name without storage name)
|
||||
|
||||
Pros: Store a key name in the same rule of the other context storage.
|
||||
|
||||
Cons: If a user uses a same key name for the different storages, name confliction will occur.
|
||||
|
||||
My proposal is as follows. Do you agree with this option?
|
||||
- Choose the option 2.
|
||||
- Encourage a unique key name by writing it on design note.
|
Loading…
Reference in New Issue
Block a user