chiitiler 1.25.0 → 1.25.1

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 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
- The tile server adds a per-process memory front cache to every cache method, including
196
- `none` and `memory`: by default, buffers are retained for 10 seconds from insertion, with an
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
- const ttl = options.frontCacheTtlSec;
153
- const size = options.frontCacheMaxBytes;
154
- serverOptions.cache = caches.withMemoryCache(serverOptions.cache, {
155
- ttlSeconds: ttl === undefined ? undefined : Number(ttl.trim() || NaN),
156
- maxBytes: size === undefined ? undefined : Number(size.trim() || NaN),
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}`);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "chiitiler",
4
- "version": "1.25.0",
4
+ "version": "1.25.1",
5
5
  "description": "Tiny map rendering server for MapLibre Style Spec",
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",