22 ExpirableNetworkDiskCache QgsNetworkDiskCache::sDiskCache;
24 QMutex QgsNetworkDiskCache::sDiskCacheMutex;
26 QgsNetworkDiskCache::QgsNetworkDiskCache( QObject *parent )
27 : QNetworkDiskCache( parent )
33 QMutexLocker lock( &sDiskCacheMutex );
34 return sDiskCache.cacheDirectory();
39 QMutexLocker lock( &sDiskCacheMutex );
40 sDiskCache.setCacheDirectory( cacheDir );
45 QMutexLocker lock( &sDiskCacheMutex );
46 return sDiskCache.maximumCacheSize();
51 QMutexLocker lock( &sDiskCacheMutex );
52 sDiskCache.setMaximumCacheSize( size );
57 QMutexLocker lock( &sDiskCacheMutex );
58 return sDiskCache.cacheSize();
63 QMutexLocker lock( &sDiskCacheMutex );
64 return sDiskCache.metaData( url );
69 QMutexLocker lock( &sDiskCacheMutex );
70 sDiskCache.updateMetaData(
metaData );
75 QMutexLocker lock( &sDiskCacheMutex );
76 return sDiskCache.data( url );
81 QMutexLocker lock( &sDiskCacheMutex );
82 return sDiskCache.remove( url );
87 QMutexLocker lock( &sDiskCacheMutex );
88 return sDiskCache.prepare(
metaData );
93 QMutexLocker lock( &sDiskCacheMutex );
94 sDiskCache.insert( device );
99 QMutexLocker lock( &sDiskCacheMutex );
100 return sDiskCache.fileMetaData( fileName );
105 QMutexLocker lock( &sDiskCacheMutex );
106 return sDiskCache.runExpire();
111 QMutexLocker lock( &sDiskCacheMutex );
112 return sDiskCache.clear();