forked from MapComplete/MapComplete
		
	Invalidate cache if a point has been deleted or changed geometry. Fix #865; review cache retention times and disable cache for external geojson datasets, fix #1660
This commit is contained in:
		
							parent
							
								
									adaff94dbd
								
							
						
					
					
						commit
						a399260bf0
					
				
					 6 changed files with 68 additions and 39 deletions
				
			
		|  | @ -27,14 +27,14 @@ export default class LocalStorageFeatureSource extends DynamicTileSource { | |||
|             options?.maxAge ?? 24 * 60 * 60 | ||||
|         ) | ||||
|         super( | ||||
|            new ImmutableStore(zoomlevel), | ||||
|             new ImmutableStore(zoomlevel), | ||||
|             layer.minzoom, | ||||
|             (tileIndex) => | ||||
|                 new StaticFeatureSource( | ||||
|                     storage.getTileSource(tileIndex).mapD((features) => { | ||||
|                         if (features.length === undefined) { | ||||
|                             console.trace("These are not features:", features) | ||||
|                             storage.invalidate(zoomlevel, tileIndex) | ||||
|                             storage.invalidate(tileIndex) | ||||
|                             return [] | ||||
|                         } | ||||
|                         return features.filter((f) => !f.properties.id.match(/(node|way)\/-[0-9]+/)) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue