From 80882acd6ba407847fed0ef308e440b88796e0e1 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Wed, 23 Apr 2025 17:55:57 +0200 Subject: Change layer cache logic to target destination layers rather than sources. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In a future commit we'll fingerprint layers to detect changes. Comparing modification times is not enough since some sources (for instance Naturvårdsverket's SCI_Rikstackande) are updated on the server even though no objects are being added; the source layer remains unchanged but the file differs because of OBJECTID changes we are not interested in. Rather than using another cache layer/table for fingerprints, we cache destination layernames rather than triplets (source_path, archive_member, layername), along with the time at which the import was started rather than source_path's mtime. There is indeed no value in having exact source_path's mtime in the cache. What we need is simply a way to detect whether source paths have been updated in a subsequent run. Thanks to the shared locks the ctime of any updated source path will be at least the time when the locks are released, thereby exceeding the last_updated value. --- config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config.yml') diff --git a/config.yml b/config.yml index 8fa6ca7..08ee039 100644 --- a/config.yml +++ b/config.yml @@ -108,7 +108,7 @@ dataset: open-options-publish: USER: webmap_guest - sourcecache-layername: public.sourcecache + layercache: public.layercache # Optional dictionary of default layer creation options, cf. # https://gdal.org/drivers/vector/pg.html#layer-creation-options or -- cgit v1.2.3