diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-01-16 21:32:28 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-16 21:32:28 +0100 |
| commit | f1209ff020cc9f5490f8e6c7edced6877f53da49 (patch) | |
| tree | 5ce7402568146013a623b8e92071c015c4d46c1c /src/open_lib.cpp | |
| parent | 7040857c1fed53b0b896cd8f15bc34ff3c6161d3 (diff) | |
| parent | 19841f21f4319297b399bdc4f20c1c546a35e10e (diff) | |
| download | PROJ-f1209ff020cc9f5490f8e6c7edced6877f53da49.tar.gz PROJ-f1209ff020cc9f5490f8e6c7edced6877f53da49.zip | |
Merge pull request #1817 from rouault/rfc4_network_disk_cache
[RFC4_dev] Add a SQLite3 local cache of downloaded chunks
Diffstat (limited to 'src/open_lib.cpp')
| -rw-r--r-- | src/open_lib.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/open_lib.cpp b/src/open_lib.cpp index cde5be7b..23ee79a0 100644 --- a/src/open_lib.cpp +++ b/src/open_lib.cpp @@ -520,6 +520,16 @@ void pj_load_ini(projCtx ctx) ci_equal(value, "YES") || ci_equal(value, "TRUE"); } + } else if ( key == "cache_enabled" ) { + ctx->gridChunkCache.enabled = ci_equal(value, "ON") || + ci_equal(value, "YES") || + ci_equal(value, "TRUE"); + } else if ( key == "cache_size_MB" ) { + const int val = atoi(value.c_str()); + ctx->gridChunkCache.max_size = val > 0 ? + static_cast<long long>(val) * 1024 * 1024 : -1; + } else if ( key == "cache_ttl_sec" ) { + ctx->gridChunkCache.ttl = atoi(value.c_str()); } } |
