# JS API Changes of the Distributed Data Management Subsystem The table below lists the APIs changes of the distributed data management subsystem in OpenHarmony 3.2 Beta1 over OpenHarmony 3.1 Release. ## API Changes | Module| Class| Method/Attribute/Enumeration/Constant| Change Type| |---|---|---|---| | ohos.data.preferences | preferences | const MAX_VALUE_LENGTH: 8192; | Added| | ohos.data.preferences | preferences | const MAX_KEY_LENGTH: 80; | Added| | ohos.data.preferences | Preferences | off(type: 'change', callback?: Callback\<{ key: string }>): void; | Added| | ohos.data.preferences | Preferences | on(type: 'change', callback: Callback\<{ key: string }>): void; | Added| | ohos.data.preferences | Preferences | flush(callback: AsyncCallback\): void;
flush(): Promise\; | Added| | ohos.data.preferences | Preferences | clear(callback: AsyncCallback\): void;
clear(): Promise\; | Added| | ohos.data.preferences | Preferences | delete(key: string, callback: AsyncCallback\): void;
delete(key: string): Promise\; | Added| | ohos.data.preferences | Preferences | put(key: string, value: ValueType, callback: AsyncCallback\): void;
put(key: string, value: ValueType): Promise\; | Added| | ohos.data.preferences | Preferences | has(key: string, callback: AsyncCallback\): void;
has(key: string): Promise\; | Added| | ohos.data.preferences | Preferences | getAll(callback: AsyncCallback\): void;
getAll(): Promise\; | Added| | ohos.data.preferences | Preferences | get(key: string, defValue: ValueType, callback: AsyncCallback\): void;
get(key: string, defValue: ValueType): Promise\; | Added| | ohos.data.preferences | preferences | removePreferencesFromCache(context: Context, name: string, callback: AsyncCallback\): void;
removePreferencesFromCache(context: Context, name: string): Promise\; | Added| | ohos.data.preferences | preferences | deletePreferences(context: Context, name: string, callback: AsyncCallback\): void;
deletePreferences(context: Context, name: string): Promise\; | Added| | ohos.data.preferences | preferences | getPreferences(context: Context, name: string, callback: AsyncCallback\): void;
getPreferences(context: Context, name: string): Promise\; | Added| | ohos.data.storage | storage | const MAX_VALUE_LENGTH: 8192; | Deprecated| | ohos.data.storage | storage | const MAX_KEY_LENGTH: 80; | Deprecated| | ohos.data.storage | StorageObserver | key: string; | Deprecated| | ohos.data.storage | Storage | off(type: 'change', callback: Callback\): void; | Deprecated| | ohos.data.storage | Storage | on(type: 'change', callback: Callback\): void; | Deprecated| | ohos.data.storage | Storage | flush(callback: AsyncCallback\): void;
flush(): Promise\; | Deprecated| | ohos.data.storage | Storage | flushSync(): void; | Deprecated| | ohos.data.storage | Storage | clear(callback: AsyncCallback\): void;
clear(): Promise\; | Deprecated| | ohos.data.storage | Storage | clearSync(): void; | Deprecated| | ohos.data.storage | Storage | delete(key: string, callback: AsyncCallback\): void;
delete(key: string): Promise\; | Deprecated| | ohos.data.storage | Storage | deleteSync(key: string): void; | Deprecated| | ohos.data.storage | Storage | put(key: string, value: ValueType, callback: AsyncCallback\): void;
put(key: string, value: ValueType): Promise\; | Deprecated| | ohos.data.storage | Storage | putSync(key: string, value: ValueType): void; | Deprecated| | ohos.data.storage | Storage | has(key: string, callback: AsyncCallback\): boolean;
has(key: string): Promise\; | Deprecated| | ohos.data.storage | Storage | hasSync(key: string): boolean; | Deprecated| | ohos.data.storage | Storage | get(key: string, defValue: ValueType, callback: AsyncCallback\): void;
get(key: string, defValue: ValueType): Promise\; | Deprecated| | ohos.data.storage | Storage | getSync(key: string, defValue: ValueType): ValueType; | Deprecated| | ohos.data.storage | storage | removeStorageFromCache(path: string, callback: AsyncCallback\): void;
removeStorageFromCache(path: string): Promise\; | Deprecated| | ohos.data.storage | storage | removeStorageFromCacheSync(path: string): void; | Deprecated| | ohos.data.storage | storage | deleteStorage(path: string, callback: AsyncCallback\): void;
deleteStorage(path: string): Promise\; | Deprecated| | ohos.data.storage | storage | deleteStorageSync(path: string): void; | Deprecated| | ohos.data.storage | storage | getStorage(path: string, callback: AsyncCallback\): void;
getStorage(path: string): Promise\; | Deprecated| | ohos.data.storage | storage | getStorageSync(path: string): Storage; | Deprecated|