diff --git a/Design:-Persistable-Context.md b/Design:-Persistable-Context.md index 77d2de7..f3a6fa6 100644 --- a/Design:-Persistable-Context.md +++ b/Design:-Persistable-Context.md @@ -148,4 +148,24 @@ 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. \ No newline at end of file +>> 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. \ No newline at end of file