diff --git a/attica-kde/kdeplugin/kdeplatformdependent.cpp b/attica-kde/kdeplugin/kdeplatformdependent.cpp --- a/attica-kde/kdeplugin/kdeplatformdependent.cpp +++ b/attica-kde/kdeplugin/kdeplatformdependent.cpp @@ -33,14 +33,23 @@ #include #include #include +#include +#include using namespace Attica; KdePlatformDependent::KdePlatformDependent() : m_config(KSharedConfig::openConfig("atticarc")), m_accessManager(0), m_wallet(0) { // FIXME: Investigate how to not leak this instance witohut crashing. m_accessManager = new QNetworkAccessManager(0); + + const QString cacheDir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QStringLiteral("/attica"); + QNetworkDiskCache *cache = new QNetworkDiskCache(m_accessManager); + QStorageInfo storageInfo(cacheDir); + cache->setCacheDirectory(cacheDir); + cache->setMaximumCacheSize(storageInfo.bytesTotal() / 1000); + m_accessManager->setCache(cache); } KdePlatformDependent::~KdePlatformDependent()