Commit Graph

17 Commits

Author SHA1 Message Date
Mathew Sutcliffe
f4eadddee7 refs #644 Add method CCached::save, like setAndSave but using the currently set value.
Implemented with a flag in CValueCachePacket to indicate a request to save only.
2016-04-27 19:39:49 +01:00
Mathew Sutcliffe
6b1b599275 refs #623 Fixed CDataPageQueue performance. 2016-03-19 19:41:33 +00:00
Mathew Sutcliffe
6f3faa5d7e Fixed mistake in CData::isStale. 2016-03-19 16:06:48 +00:00
Mathew Sutcliffe
259f8d7a68 refs #601 Introduce "pinned" values, which are loaded synchronously by the CDataCache constructor. 2016-03-18 01:07:41 +00:00
Mathew Sutcliffe
c6a038aaa8 refs #601 Simplify syncLoad and rename to synchronize.
Now it doesn't return anything, it just causes the next async get() to be synchronized with the latest loaded value.
It does this by hooking into the queue introduced in the previous commit.
2016-03-18 01:07:38 +00:00
Mathew Sutcliffe
06ad77ee9d refs #601 CDataCache overrides connectPage to provide a queue that is more flexible than the usual Qt::QueuedConnection. 2016-03-18 01:07:32 +00:00
Mathew Sutcliffe
bef19a5240 refs #581, #592 Allow to renew a stale value by updating the timestamp on disk without altering the value. 2016-02-06 19:45:51 +00:00
Mathew Sutcliffe
a58dddfa19 refs #581, #592 Make sure syncLoad checks if the next load would load the value, if it is not currently loading. 2016-02-06 19:45:49 +00:00
Mathew Sutcliffe
071dbda4b7 refs #581 Store a TTL value in the data cache revision file, skip loading a cached value if its timestamp is too old. 2016-02-06 19:45:48 +00:00
Mathew Sutcliffe
e0607eb83c refs #581 Synchronous loading of data cache value by returning a future.
CDataCacheRevision maintains a list of promises corresponding to the futures, so they can be delivered
when the loading is finished. Corresponding notification slot is inhibited to avoid duplicate notification.
2016-02-06 19:45:47 +00:00
Mathew Sutcliffe
c1d3e2aabb refs #581 Refactoring: extract method applyDeferredChanges. 2016-02-06 19:45:46 +00:00
Mathew Sutcliffe
e1b40f54cb refs #581 Allow setting the timestamp when putting a value in the cache. 2016-02-06 19:45:45 +00:00
Mathew Sutcliffe
97fad301ae refs #581 Use JSON to store timestamps in data cache revision file. 2016-02-06 19:45:45 +00:00
Mathew Sutcliffe
ef38c1620f refs #581 Refactor data cache revision file logic into new class CDataCacheRevision. 2016-02-06 19:45:44 +00:00
Mathew Sutcliffe
4f2de590c6 refs #545 Fixed mistake (method in wrong class). 2016-02-06 19:45:40 +00:00
Mathew Sutcliffe
956d393bb1 refs #545 CSetting<T>::setAndSave to set and save a setting in one step. 2016-01-27 23:37:46 +00:00
Klaus Basan
070ba8f158 refs #559, moved cache/settings to blackmisc 2015-12-20 17:00:10 +01:00