If map tiles, web layers, or other online data in QGIS look outdated, clearing the cache may help. QGIS stores some downloaded data temporarily so it can load maps faster and reduce repeat requests. That saved data can occasionally become stale, especially after a layer or service has changed. The right way to clear QGIS cache depends on what you mean by “cache”: network data, a layer’s display, or information shown in the Browser panel. This guide explains the safest steps, what clearing cache does, and what to try if the problem remains.
What Does the QGIS Cache Do?
QGIS may keep temporary copies of data it has downloaded from online services. This can include map tiles and responses from web services such as WMS or other network-based layers. When you reopen or redraw a map, QGIS may reuse those saved responses instead of downloading them again. This improves performance, but it can also mean that a map continues to show an older response for a while.
“Cache” can also refer to a layer that has not refreshed on the map canvas, or to information displayed in the QGIS Browser panel. Those issues are not always fixed by clearing the network cache. First identify what looks wrong: an online layer may need its network cache cleared, while a map that simply has not redrawn may only need a refresh.
Clearing cache normally removes temporary stored data; it does not delete your QGIS project, source datasets, or saved layer styling. You may notice that online layers take longer to load the next time because QGIS has to fetch the information again.
How to Clear the QGIS Network Cache
For stale XYZ tiles or web-service layers, start with QGIS’s cache controls in the application settings. Menu names and exact options can differ slightly between QGIS releases, but the Network section is the place to look.
- Open QGIS and, if possible, save your project.
- Open Settings > Options on Windows or Linux. On macOS, the options may be under the QGIS application menu.
- Select the Network tab in the Options window.
- Look for the cache settings or cache controls. If your version provides a Clear cache button, select it and confirm if prompted.
- Close the Options window, then refresh the map canvas or reload the affected online layer.
Some versions also let you set a cache directory, a maximum cache size, or how long cached responses are retained. These settings affect future caching; changing the size or expiration period is not always the same as immediately deleting existing cached content. Use the clear command where available if you specifically need to remove the current network cache.
If you cannot find a clear-cache control, check the Network tab and the help documentation for your installed QGIS version. The interface can change between releases, so instructions written for a different version may not match exactly. You can check your version through Help > About.
Refresh the Map Canvas Before Clearing More Data
A map that looks outdated is not necessarily displaying a cached network response. QGIS may simply need to redraw the canvas. Try the refresh or redraw command first; in many QGIS versions, Ctrl+R refreshes the map canvas. You can also use the refresh control on the map canvas toolbar if it is visible.
If refreshing the canvas does not help, reload the affected layer. In the Layers panel, right-click the layer and look for a reload or refresh option, if one is available for that layer type. You can also temporarily turn the layer off and on again. These actions prompt QGIS to redraw or request data, but they may not remove the saved network response. If the same old tiles or service response return, clear the network cache as described above.
Keep in mind that a refresh only asks QGIS to draw or retrieve the data again. The data provider, web server, proxy, or content delivery network may also be serving an older version. If clearing QGIS’s cache makes no difference, test the service outside QGIS or check with its provider before assuming the application is at fault.
Refresh Data in the QGIS Browser Panel
The Browser panel lists data sources and connections, such as folders, databases, and web services. If a new file, table, or connection does not appear, the Browser panel may need to refresh. Right-click the relevant item or folder and choose Refresh, where available. For a filesystem source, navigating to the folder again may also update the listing.
Refreshing the Browser panel updates what QGIS displays in that panel; it is different from clearing the network cache. If the item is an online service and its map contents are still old after the Browser refresh, use the network-cache steps as well. For local files, confirm that the file exists at the path shown and that the project is pointing to the correct location.
Clear Cache for XYZ Tiles and Other Web Layers
XYZ tile layers are commonly used for online basemaps. QGIS can reuse downloaded tiles, so a tile may appear unchanged even after the source has been updated. Clear the network cache, then refresh the canvas and allow the tiles to load again. The first redraw may be slower because QGIS has to download the tiles rather than reuse saved copies.
For WMS, WMTS, or similar services, the process is much the same: clear the network cache, then refresh or reload the layer. If the service has several layers or styles, confirm that the connection is requesting the intended one. A layer showing the wrong date, style, or extent may be a connection or service-setting issue rather than a cache issue.
Remember that QGIS is only one part of the delivery chain. A web service can cache its own output, and an organization’s proxy or the service provider’s network may do the same. If a refreshed QGIS layer still displays old information, the source provider may need to clear or update its cache. You can also compare the result with the service’s own web viewer, if one is available.
Manually Remove QGIS Cache Files
Manual deletion should be a last resort. It is generally safer to use the cache controls in QGIS because they target the relevant temporary data. If you do need to remove files manually, first close QGIS completely. Deleting cache files while QGIS is running can interfere with active requests or cause the application to recreate files immediately.
QGIS stores settings and related files in a user profile, but the cache location can vary by operating system, QGIS version, profile, and the path configured in Network options. Check the cache directory shown in the Network settings rather than guessing from a generic online path. If you cannot confirm the correct directory, do not delete files from the profile at random.
Never delete the entire QGIS profile just to clear a cache. A profile can contain application settings, connections, plugins, authentication configuration, and other user preferences. Removing it may cause you to lose configuration that has nothing to do with cached map data. If you do remove a confirmed cache folder manually, delete only its contents and leave project files and unrelated profile folders untouched.
What Clearing the Cache Does—and Does Not—Fix
- It can help with: stale online tiles, outdated responses from a web layer, or network data that QGIS keeps reusing.
- It may not help with: a broken internet connection, an unavailable service, incorrect layer settings, invalid credentials, or outdated source data.
- It does not normally delete: your saved QGIS project or original shapefiles, GeoPackages, rasters, and databases.
- It can temporarily slow loading: online layers may need to be downloaded again after their saved responses are removed.
- It may not clear other caches: browser panels, remote servers, proxies, and web browsers can have separate stored data.
If a layer stops working after you clear the cache, check the connection and credentials, then test whether the service is reachable. Avoid repeatedly deleting unrelated QGIS settings: doing so is unlikely to fix a server-side problem and can make it harder to diagnose the original issue.
Troubleshooting When QGIS Cache Clearing Does Not Work
If the map still looks old, work through a few checks before changing more settings. Confirm that the online layer is enabled and that its source URL, layer name, date parameters, and styling are correct. Check your internet connection and look for an error message in QGIS. If other online services also fail, the issue may be connectivity, a firewall, a proxy, or authentication rather than a stale cache.
Next, compare the layer with its source. If the provider’s own viewer shows the same old data, QGIS is likely displaying what the service currently supplies. If the provider shows newer data, try removing and re-adding the connection only after recording its settings. This can help identify a connection problem, but it is not a substitute for keeping a copy of any configuration you may need.
For recurring problems, review the cache size and expiration options in Settings > Options > Network. A shorter retention period can reduce how long QGIS reuses responses, though it may increase network traffic and loading time. Choose settings that fit your connection and workflow rather than disabling caching without a reason.
How to Prevent Stale Cache Problems
Keep QGIS updated to a supported release and use the built-in cache controls when online layers appear outdated. For frequently changing services, note when the provider updates its data and whether it documents a refresh schedule. If you manage your own web service, check both QGIS’s cache settings and the server’s cache policy; clients cannot force a source to publish data that the server has not updated.
It is also useful to distinguish temporary map display issues from source-data problems. Refresh the canvas first, then refresh the Browser panel or reload the layer as appropriate, and clear the network cache only when the issue points to cached online content. This targeted approach avoids unnecessary changes and makes troubleshooting easier.
Conclusion
To clear QGIS cache, open Settings > Options > Network and use the cache controls available in your version, then refresh or reload the affected layer. Start with a simple map-canvas refresh if you are unsure whether stale network data is the cause. Clearing QGIS’s network cache removes temporary stored responses, not your project or original datasets. If old information remains, check the layer connection and the service itself, since the source server or another network cache may be responsible.
Disclaimer: Articles are written by Humans, AI or Both. Verify Important information.