Commit Graph

32 Commits

Author SHA1 Message Date
Klaus Basan
dc02ff2d0c Addded log categories / human readable pattern 2016-06-29 01:04:44 +02:00
Mathew Sutcliffe
d53237cebc refs #659, #657 Fixed mistake in synchronize() where a future would be broken prematurely if async load had not yet started after 1 second timeout. 2016-06-06 18:27:51 +01:00
Mathew Sutcliffe
aefef81cd7 refs #659 Read-only versions of cache value access classes. 2016-06-05 21:18:52 +01:00
Mathew Sutcliffe
a2b0602c53 refs #659 Fixed minor mistakes. 2016-06-05 21:18:49 +01:00
Mathew Sutcliffe
50de252ff6 refs #659 Fixed a bug where valid timestamps of unloaded values would be lost when writing a new .rev file. 2016-06-04 00:51:01 +01:00
Mathew Sutcliffe
8377ab2e51 refs #659 Method to get timestamp from revision file without loading value. 2016-06-04 00:50:59 +01:00
Mathew Sutcliffe
5559d1fcc6 refs #659 Use a threadsafe queue for admit(), to avoid a race with synchronize(). 2016-06-04 00:50:54 +01:00
Mathew Sutcliffe
f1a9ae5a13 refs #659 Add the method CData::admit() which causes a value with deferred loading to be loaded. 2016-06-04 00:50:47 +01:00
Mathew Sutcliffe
29cea55bc9 refs #659 Allow setting a "deferred" flag in data cache values, causing the value not to be loaded. 2016-05-26 20:03:13 +01:00
Mathew Sutcliffe
4c08d1cc86 refs #659 Use constexpr with isPinned method of data cache traits. 2016-05-26 19:57:22 +01:00
Mathew Sutcliffe
d0d100da5e refs #664 Use timestamps from .rev file instead of the filesystem timestamps of the json files. 2016-05-26 18:03:21 +01:00
Mathew Sutcliffe
f523197dfd refs #657 Fixed race condition in synchronize(). 2016-05-22 15:34:05 +01:00
Mathew Sutcliffe
9da53bd58b refs #646 Added timestamps in data cache load/save log messages. 2016-05-22 15:34:05 +01:00
Roland Winklmeier
3d7a39ed00 Fix BlackMisc header includes
* Include only what is used
* Use forward declaration when possible
* Sorted includes

refs #630
2016-05-13 17:05:49 +02:00
Mathew Sutcliffe
ed2c8130ae refs #652 Convenience to support changing only an indexed property of a cached value. 2016-05-05 15:25:07 +01:00
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