Override, for the considered context, the time-to-live delay for * re-checking if the cached properties of files are still up-to-date. * * @param ctx PROJ context, or NULL * @param ttl_seconds Delay in seconds. Use negative value for no expiration. * @since 7.0 */
| 2469 | * @since 7.0 |
| 2470 | */ |
| 2471 | void proj_grid_cache_set_ttl(PJ_CONTEXT *ctx, int ttl_seconds) { |
| 2472 | if (ctx == nullptr) { |
| 2473 | ctx = pj_get_default_ctx(); |
| 2474 | } |
| 2475 | // Load ini file, now so as to override its settings |
| 2476 | pj_load_ini(ctx); |
| 2477 | ctx->gridChunkCache.ttl = ttl_seconds; |
| 2478 | } |
| 2479 | |
| 2480 | // --------------------------------------------------------------------------- |
| 2481 |