1# JS API Changes of the Distributed Data Management Subsystem 2 3The table below lists the APIs changes of the distributed data management subsystem in OpenHarmony 3.2 Beta1 over OpenHarmony 3.1 Release. 4 5## API Changes 6 7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type| 8|---|---|---|---| 9| ohos.data.preferences | preferences | const MAX_VALUE_LENGTH: 8192; | Added| 10| ohos.data.preferences | preferences | const MAX_KEY_LENGTH: 80; | Added| 11| ohos.data.preferences | Preferences | off(type: 'change', callback?: Callback\<{ key: string }>): void; | Added| 12| ohos.data.preferences | Preferences | on(type: 'change', callback: Callback\<{ key: string }>): void; | Added| 13| ohos.data.preferences | Preferences | flush(callback: AsyncCallback\<void>): void;<br>flush(): Promise\<void>; | Added| 14| ohos.data.preferences | Preferences | clear(callback: AsyncCallback\<void>): void;<br>clear(): Promise\<void>; | Added| 15| ohos.data.preferences | Preferences | delete(key: string, callback: AsyncCallback\<void>): void;<br>delete(key: string): Promise\<void>; | Added| 16| ohos.data.preferences | Preferences | put(key: string, value: ValueType, callback: AsyncCallback\<void>): void;<br>put(key: string, value: ValueType): Promise\<void>; | Added| 17| ohos.data.preferences | Preferences | has(key: string, callback: AsyncCallback\<boolean>): void;<br>has(key: string): Promise\<boolean>; | Added| 18| ohos.data.preferences | Preferences | getAll(callback: AsyncCallback\<Object>): void;<br>getAll(): Promise\<Object>; | Added| 19| ohos.data.preferences | Preferences | get(key: string, defValue: ValueType, callback: AsyncCallback\<ValueType>): void;<br>get(key: string, defValue: ValueType): Promise\<ValueType>; | Added| 20| ohos.data.preferences | preferences | removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback\<void>): void;<br>removePreferencesFromCache(context: Context, name: string): Promise\<void>; | Added| 21| ohos.data.preferences | preferences | deletePreferences(context: Context, name: string, callback: AsyncCallback\<void>): void;<br>deletePreferences(context: Context, name: string): Promise\<void>; | Added| 22| ohos.data.preferences | preferences | getPreferences(context: Context, name: string, callback: AsyncCallback\<Preferences>): void;<br>getPreferences(context: Context, name: string): Promise\<Preferences>; | Added| 23| ohos.data.storage | storage | const MAX_VALUE_LENGTH: 8192; | Deprecated| 24| ohos.data.storage | storage | const MAX_KEY_LENGTH: 80; | Deprecated| 25| ohos.data.storage | StorageObserver | key: string; | Deprecated| 26| ohos.data.storage | Storage | off(type: 'change', callback: Callback\<StorageObserver>): void; | Deprecated| 27| ohos.data.storage | Storage | on(type: 'change', callback: Callback\<StorageObserver>): void; | Deprecated| 28| ohos.data.storage | Storage | flush(callback: AsyncCallback\<void>): void;<br>flush(): Promise\<void>; | Deprecated| 29| ohos.data.storage | Storage | flushSync(): void; | Deprecated| 30| ohos.data.storage | Storage | clear(callback: AsyncCallback\<void>): void;<br>clear(): Promise\<void>; | Deprecated| 31| ohos.data.storage | Storage | clearSync(): void; | Deprecated| 32| ohos.data.storage | Storage | delete(key: string, callback: AsyncCallback\<void>): void;<br>delete(key: string): Promise\<void>; | Deprecated| 33| ohos.data.storage | Storage | deleteSync(key: string): void; | Deprecated| 34| ohos.data.storage | Storage | put(key: string, value: ValueType, callback: AsyncCallback\<void>): void;<br>put(key: string, value: ValueType): Promise\<void>; | Deprecated| 35| ohos.data.storage | Storage | putSync(key: string, value: ValueType): void; | Deprecated| 36| ohos.data.storage | Storage | has(key: string, callback: AsyncCallback\<boolean>): boolean;<br>has(key: string): Promise\<boolean>; | Deprecated| 37| ohos.data.storage | Storage | hasSync(key: string): boolean; | Deprecated| 38| ohos.data.storage | Storage | get(key: string, defValue: ValueType, callback: AsyncCallback\<ValueType>): void;<br>get(key: string, defValue: ValueType): Promise\<ValueType>; | Deprecated| 39| ohos.data.storage | Storage | getSync(key: string, defValue: ValueType): ValueType; | Deprecated| 40| ohos.data.storage | storage | removeStorageFromCache(path: string, callback: AsyncCallback\<void>): void;<br>removeStorageFromCache(path: string): Promise\<void>; | Deprecated| 41| ohos.data.storage | storage | removeStorageFromCacheSync(path: string): void; | Deprecated| 42| ohos.data.storage | storage | deleteStorage(path: string, callback: AsyncCallback\<void>): void;<br>deleteStorage(path: string): Promise\<void>; | Deprecated| 43| ohos.data.storage | storage | deleteStorageSync(path: string): void; | Deprecated| 44| ohos.data.storage | storage | getStorage(path: string, callback: AsyncCallback\<Storage>): void;<br>getStorage(path: string): Promise\<Storage>; | Deprecated| 45| ohos.data.storage | storage | getStorageSync(path: string): Storage; | Deprecated| 46