summaryrefslogtreecommitdiff
path: root/platform/default/default_file_source.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [build] move logging to utilKonstantin Käfer2016-11-221-1/+1
|
* [core] LocalFileSource implementation and testsIvo van Dongen2016-09-301-1/+5
|
* [core] allow offline region metadata to be updated (#6338)Molly Lloyd2016-09-201-0/+16
|
* [core] [android] - public api configurable base endpoint (#6309)Tobrun2016-09-151-0/+16
| | | add runloop to test
* [core] Rework invokeWithCallback so that the callback is lastJohn Firebaugh2016-09-081-1/+1
|
* [core] Simplify Thread::invokeSync (#6128)John Firebaugh2016-08-241-1/+1
|
* [core] allow creating optional requestsKonstantin Käfer2016-05-181-11/+25
| | | | | | Introduces "optional" requests. These should be fulfilled by the FileSource only there's a low-cost/easy way to obtain the data (e.g. from a local cache). If the data for an optional request cannot be found, it *must* return a Response object with a NotFound error. Traditional "required" requests still work the same way, with one change: If you set any prior* field in the Resource (i.e. priorModified, priorEtag, or priorExpires), the DefaultFileSource assumes that you already have the cache value and will not consult the cache before performing the request. If a prior cache lookup didn't turn up any data, and you therefore don't have an Etag or Modified value, you can still skip the cache by setting priorExpires. This will of course always result in a non-conditional HTTP request.
* [core] remove indirection via Task object in DefaultFileSourceKonstantin Käfer2016-05-121-25/+16
|
* [core] Clean up ThreadContext vestigesJohn Firebaugh2016-04-151-1/+1
|
* Merge branch 'release-ios-3.2.0-android-4.0.0'John Firebaugh2016-03-301-0/+1
|\
| * [core] Stop any OfflineDownload before deleting a regionJohn Firebaugh2016-03-211-0/+1
| | | | | | | | No progress events should be processed after deleting a region.
* | [core] Unify FileRequest and WorkRequestJohn Firebaugh2016-03-241-8/+8
|/
* [core] Make OnlineFileSource respect the NetworkStatusThiago Marcos P. Santos2016-03-081-7/+4
| | | | | The user can now force the Offline mode and set it back to Online, triggering the requests waiting for network connection.
* [core] Remove goOffline() from DefaultFileSourceThiago Marcos P. Santos2016-03-081-10/+2
| | | | Use the newly added NetworkStatus::Set().
* [core] Limit total number of offline Mapbox tilesJohn Firebaugh2016-02-241-0/+8
|
* [core] Eliminate maximumCacheEntrySizeJohn Firebaugh2016-02-101-5/+4
| | | | Instead, the eviction policy accounts for the actual size needed for an incoming put.
* [core] Implement an eviction policy for OfflineDatabaseJohn Firebaugh2016-02-101-25/+8
| | | | | | | | | | | | | When inserting an cached resource, or removing a region, remove least-recently used resources and tiles, not used by offline regions, until the used database size, as calculated by multiplying the number of in-use pages by the page size, is less than the maximum cache size minus 5 times the page size. In addition, OfflineDatabase may be configured to ignore cache puts of individual resources larger than a certain size. This policy is similar but not identical to the former SQLiteCache policy: * It accounts for offline, by exempting resources required by offline regions from eviction. * It must delete from two tables (resources and tiles), rather than one. Currently the strategy is naive: evict 50 rows at a time from each table. * It makes maximumCacheSize and maximumCacheEntrySize completely independent. The SQLiteCache implementation evicted when `usedSize > maximumCacheSize - 2 * maximumCacheEntrySize`. This evicts when `usedSize > maximumCacheSize - 5 * pageSize`. * It uses a non-unlimited default value for maximumCacheSize: 50 MB. We should have always had a limit in place; "a cache without an eviction policy is a resource leak".
* [core] Make {Default,Online}FileSource::Impl more similarJohn Firebaugh2016-02-101-16/+16
|
* [core] Interface and implementation for offlineJohn Firebaugh2016-02-101-1/+97
|
* [core] Reimplement existing caching within an offline-capable database schemaJohn Firebaugh2016-02-101-47/+89
|
* [core] Moving caching logic to DefaultFileSourceJohn Firebaugh2016-02-101-3/+37
| | | | This results in OnlineFileSource containing precisely the logic we want for reuse by OfflineFileSource, and no more.
* [core] move SharedSQLiteCache::get to SQLiteCache::getSharedKonstantin Käfer2016-01-151-1/+1
|
* [core] Eliminate platform::assetRoot()John Firebaugh2016-01-131-2/+2
| | | | I regenerated assets.zip so that all file paths have an `assets/` prefix, as the Android AssetFileSource implementation asserts, and removed `TEST_DATA` from the paths.
* [core] Simplify asset:// implementationJohn Firebaugh2016-01-131-4/+24
| | | | | | | | * Move asset:// URL handling to DefaultFileSource. * AssetFileSource implements FileSource interface and follows familiar implementation patterns. * Move default implementation to platform/default, zip implementation to platform/android. * Don't bother with modified / expires / etag -- assets are not cached so it doesn't matter. * Don't bother with interleaving individual IO calls on the implementation thread. That adds a lot of complexity for very little benefit.
* [core] Privatize SQLiteCacheJohn Firebaugh2016-01-081-4/+15
|
* [tests] Test with OnlineFileSourceJohn Firebaugh2015-12-231-2/+1
| | | | | When we introduce OfflineFileSource, the behavior of existing tests should not change.
* [core] Move OnlineFileSource to platformJohn Firebaugh2015-12-221-0/+34
Preparation for OfflineFileSource which depends on SQLite