Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache doesn't respect the cache size set in network settings #56197

Open
2 tasks done
pathmapper opened this issue Feb 6, 2024 · 1 comment
Open
2 tasks done

Cache doesn't respect the cache size set in network settings #56197

pathmapper opened this issue Feb 6, 2024 · 1 comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Networking

Comments

@pathmapper
Copy link
Contributor

pathmapper commented Feb 6, 2024

What is the bug or the crash?

In network settings it's possible to set a cache directory and size:

image

It's expected that the cache size set in network settings accounts for everything in cache directory.

But inside this cache directory (here /home/user/.cache/QGIS/QGIS3) also the http-ranges cache folder is created which is using the same size set in network settings for it's own, so in total the total cache size in the cache directory could be twice as much compared to what is set in settings.

cacheDirectory += QLatin1String( "http-ranges" );
const qint64 cacheSize = settings.value( QStringLiteral( "cache/size" ), 256 * 1024 * 1024 ).toLongLong();
mRangesCache->setCacheDirectory( cacheDirectory );
mRangesCache->setCacheSize( cacheSize );

Steps to reproduce the issue

  1. Set cache to 10000 KiB
  2. use QGIS to populate the normal cache to maximum size. e.g. adding and browsing the standard OSM XYZ-Tiles (cached data is located in data8 folder)
  3. to populate the http-ranges folder, load and browse some COPC, e.g.
    https://s3.amazonaws.com/hobu-lidar/sofi.copc.laz
  1. inspect the size of the cache folder specified in settings
    -> size is more than what is set in networks settings (>10000 KiB)

Versions

QGIS version 3.35.0-Master QGIS code revision 0ea61d5
Qt version 5.15.3
Python version 3.10.12
GDAL/OGR version 3.9.0dev-c1783d9d78
PROJ version 8.2.1
EPSG Registry database version v10.041 (2021-12-03)
GEOS version 3.10.2-CAPI-1.16.0
SQLite version 3.37.2
PDAL version 2.3.0
PostgreSQL client version 14.10 (Ubuntu 14.10-0ubuntu0.22.04.1)
SpatiaLite version 5.0.1
QWT version 6.1.4
QScintilla2 version 2.11.6
OS version Ubuntu 22.04.3 LTS
       
Active Python plugins
grassprovider 2.12.99
MetaSearch 0.3.6
processing 2.12.99
db_manager 0.1.20

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

@Gustry
Copy link
Contributor

Gustry commented Sep 23, 2024

FYI #58548 in QGIS 3.40

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Networking
Projects
None yet
Development

No branches or pull requests

2 participants