chiitiler 1.25.0 → 1.25.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/cli.js +9 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -192,8 +192,8 @@ retaining native renderer memory between requests.
|
|
|
192
192
|
|
|
193
193
|
Chiitiler caches *source assets* (vector tiles, glyphs, sprites) — not final rasters — so cached data is reused across requests. Standard AWS / GCP credentials (`AWS_ACCESS_KEY_ID`, `GOOGLE_APPLICATION_CREDENTIALS`, etc.) are respected.
|
|
194
194
|
|
|
195
|
-
|
|
196
|
-
`none
|
|
195
|
+
For the `file`, `s3` and `gcs` cache methods, the tile server adds a per-process memory front
|
|
196
|
+
cache (not for `none`, which declines caching, or `memory`, which is already in-process): by default, buffers are retained for 10 seconds from insertion, with an
|
|
197
197
|
LRU limit of 64 MiB of buffer payloads (JavaScript overhead is additional). It applies to
|
|
198
198
|
every source (`http(s)://`, `s3://`, `gs://`, `file://`, `mbtiles://`, `pmtiles://`, `cog://`).
|
|
199
199
|
Only `http(s)://` sources (including `pmtiles://http(s)://` tiles) are also stored in the
|
package/dist/cli.js
CHANGED
|
@@ -149,12 +149,15 @@ export function createProgram() {
|
|
|
149
149
|
port: parsePort(options.port),
|
|
150
150
|
debug: parseDebug(options.debug),
|
|
151
151
|
};
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
152
|
+
// none: caching was declined; memory: already in-process
|
|
153
|
+
if (['file', 's3', 'gcs'].includes(serverOptions.cache.name)) {
|
|
154
|
+
const ttl = options.frontCacheTtlSec;
|
|
155
|
+
const size = options.frontCacheMaxBytes;
|
|
156
|
+
serverOptions.cache = caches.withMemoryCache(serverOptions.cache, {
|
|
157
|
+
ttlSeconds: ttl === undefined ? undefined : Number(ttl.trim() || NaN),
|
|
158
|
+
maxBytes: size === undefined ? undefined : Number(size.trim() || NaN),
|
|
159
|
+
});
|
|
160
|
+
}
|
|
158
161
|
if (serverOptions.debug) {
|
|
159
162
|
console.log(`running server: http://localhost:${serverOptions.port}`);
|
|
160
163
|
console.log(`cache method: ${serverOptions.cache.name}`);
|