{"hash":"0xE27C97A0","ns":"CFX","name":"FLUSH_RESOURCE_KVP","slug":"FLUSH_RESOURCE_KVP","official":true,"named":true,"luaName":"FlushResourceKvp","game":"cfx","apiset":"server","returnType":"void","params":[],"summary":"Nonsynchronous operations will not wait for a disk/filesystem flush before returning from a write or delete call.","descriptions":[{"source":"cfx","format":"md","body":"Nonsynchronous operations will not wait for a disk/filesystem flush before returning from a write or delete call. They will be much faster than their synchronous counterparts (e.g., bulk operations), however, a system crash may lose the data to some recent operations.\n\nThis native ensures all `_NO_SYNC` operations are synchronized with the disk/filesystem."}],"examples":[{"lang":"lua","code":"-- Bulk write many <key, value> pairs to the resource KVP.\nlocal key = \"bug_%d\"\nlocal value = \"unintended_feature_%d\"\nfor i=1,10000 do\n\tSetResourceKvpNoSync(key:format(i), value:format(i))\nend\n\n-- Ensure all data is synchronized to the filesystem\nFlushResourceKvp()","source":"cfx"}],"aliases":[],"enums":[],"related":["0x21C7A35B","0x7389B5DF"],"sources":["cfx"],"doc":3,"url":"https://natives.borderlinerp.com/natives/CFX/FLUSH_RESOURCE_KVP","markdownUrl":"https://natives.borderlinerp.com/natives/CFX/FLUSH_RESOURCE_KVP.md","snippets":{"lua":"FlushResourceKvp()","luaInvoke":"Citizen.InvokeNative(0xe27c97a0)","js":"FlushResourceKvp();","jsInvoke":"Citizen.invokeNative('0xe27c97a0');","csharp":"Function.Call((Hash)0xe27c97a0);","notes":[]}}