| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
|
|
|
| |
Use the newly added NetworkStatus::Set().
|
| |
|
| |
|
|
|
|
| |
Instead, the eviction policy accounts for the actual size needed for an incoming put.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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".
|
| |
|
| |
|
|
|
|
| |
This results in OnlineFileSource containing precisely the logic we want for reuse by OfflineFileSource, and no more.
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
* Rename existing DefaultFileSource to OnlineFileSource
* Restore a DefaultFileSource that's a passthrough to OnlineFileSource
|
| |
|
| |
|
|
|
|
| |
This should be abstracted by util::RunLoop
|
| |
|
|
|
|
|
| |
There are no longer any requests made that don't have a run loop to
dispatch back to.
|
|
|
|
| |
Fixes #1336
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
we are now scoping all file requests to an environment object. The FileSource implementation treats
this as an opaque pointer, but allows canceling all Requests that are associated with that pointer.
This is necessary to abort all file requests that originated from a particular Map object. Aborting
a file request is different from canceling a file request: A canceled request doesn't have its
callback called, while an aborted request will have its callback called with an error, indicating
that the environment is going to be shut down.
|
| |
|
|
|