X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=lib%2Fhttp%2Fsrc%2Flocalcache.h;fp=lib%2Fhttp%2Fsrc%2Flocalcache.h;h=90725e1e2696a894854dc7a4daae2f2da40c0a22;hb=ff6d1f7f087f40438952d4b4315a8875f23281cb;hp=ff07109b7f96a03bee1a9875e124530bd2f6879f;hpb=831ecf74b394df57cbc109014189906dc972a92d;p=minitube diff --git a/lib/http/src/localcache.h b/lib/http/src/localcache.h index ff07109..90725e1 100644 --- a/lib/http/src/localcache.h +++ b/lib/http/src/localcache.h @@ -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 insertQueue; #ifndef QT_NO_DEBUG_OUTPUT uint hits;