public bool TryLoad(PropertyDatabaseRecordKey recordKey, out PropertyDatabaseRecordValue data) { { if (m_MemoryStoreView.TryLoad(recordKey, out data)) { return(true); } if (!m_FileStoreView.TryLoad(recordKey, out data)) { return(false); } // Cache loaded value into memory store. var record = CreateRecord(recordKey, data); m_MemoryStoreView.Store(record, !m_DelayedSync); return(true); } }
public bool Store(PropertyDatabaseRecord record) { if (!record.recordValue.valid) { return(false); } if (m_FileStoreView.TryLoad(record.recordKey, out PropertyDatabaseRecordValue _)) { return(false); } var success = m_MemoryStoreView.Store(record, !m_DelayedSync); if (success) { m_PropertyDatabase.StoresChanged(); } return(success); }