Commit Graph

12 Commits

Author SHA1 Message Date
John Firebaugh
1c21d0fd4c [core] Use better types for modified / expires / etag 2016-01-21 11:22:11 -08:00
John Firebaugh
2ee1fe4178 [core] std::shared_ptr<const Response> ⇢ const Response& 2016-01-14 13:46:03 -08:00
Thiago Marcos P. Santos
a5987afeb9 [core] Added versioning to the cache database
Force drop the table when the version doesn't match. Previously
it was assumed (my bad) that CREATE TABLE IF NOT EXISTS would
compare the table schema, which is not true.
2016-01-05 17:32:46 +02:00
Thiago Marcos P. Santos
6d0b01c5fb [core] Make it possible to limit the size of the SQLite cache 2015-12-27 18:15:33 +02:00
Bruno de Oliveira Abinader
31fd2822f5 [core] Replace time_t with std::chrono::seconds
Added aliases for std::chrono typedefs (eg. 'Seconds' for
std::chrono::seconds). These aliases are used together with templated
helper functions to replace time_t with std::chrono::seconds for most
cases, in particular for 'modified' and 'expires' values in Response.
2015-11-27 17:47:02 +02:00
Thiago Marcos P. Santos
00308be140 Make one arg ctors explicit 2015-07-11 12:42:45 +03:00
Thiago Marcos P. Santos
ec1b4c43fd Do not force uv_loop_t as the first parameter for a threaded object ctor 2015-07-06 16:01:59 +03:00
John Firebaugh
fc64e97bce Simplify RunLoop
Instead of transforming between return value and callback, pass
the wrapped callback on to the invoked function as the last argument.

This eliminates the need for multiple invokeWithArgument overloads
and permits invoked functions to be asynchronous.
2015-07-01 16:12:12 -07:00
John Firebaugh
32c818feea Provide Thread objects with access to loop 2015-04-28 14:32:22 -04:00
John Firebaugh
5fa0512be2 Shorten method names 2015-04-15 20:38:25 -07:00
John Firebaugh
1eaf6b8c18 Stricter Thread<> interface
Implements a Thread<>::invoke interface that only permits calling
member functions with bound arguments.

Also introduce invokeWithResult, which accepts a callback and invokes
it, passing the result, on the invoking thread's RunLoop. This closes
the loop of two evented threads doing message passing.
2015-04-15 20:38:25 -07:00
Konstantin Käfer
1066504008 separate SQLiteCache::Impl header from implementation file 2015-04-13 18:38:39 +02:00