]> git.sur5r.net Git - minitube/blobdiff - lib/http/src/localcache.h
New upstream version 3.4
[minitube] / lib / http / src / localcache.h
index ff07109b7f96a03bee1a9875e124530bd2f6879f..90725e1e2696a894854dc7a4daae2f2da40c0a22 100644 (file)
@@ -19,13 +19,13 @@ public:
 
     QByteArray value(const QByteArray &key);
     void insert(const QByteArray &key, const QByteArray &value);
-    bool clear();
+    void clear();
 
 private:
     LocalCache(const QByteArray &name);
     QString cachePath(const QByteArray &key) const;
     bool isCached(const QString &path);
-    qint64 expire();
+    void expire();
 #ifndef QT_NO_DEBUG_OUTPUT
     void debugStats();
 #endif
@@ -35,13 +35,8 @@ private:
     uint maxSeconds;
     qint64 maxSize;
     qint64 size;
-    bool expiring;
+    QMutex mutex;
     uint insertCount;
-    struct QueueItem {
-        QByteArray key;
-        QByteArray value;
-    };
-    QVector<QueueItem> insertQueue;
 
 #ifndef QT_NO_DEBUG_OUTPUT
     uint hits;