1/*
2 SPDX-FileCopyrightText: 2010 Ryan Rix <ry@n.rix.si>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#ifndef KPACKAGE_PACKAGELOADER_P_H
8#define KPACKAGE_PACKAGELOADER_P_H
9
10#include "packagestructure.h"
11#include <KPluginMetaData>
12#include <QHash>
13#include <QPointer>
14
15namespace KPackage
16{
17class PackageLoaderPrivate
18{
19public:
20 QHash<QString, QPointer<PackageStructure>> structures;
21 // We only use this cache during start of the process to speed up many consecutive calls
22 // After that, we're too afraid to produce race conditions and it's not that time-critical anyway
23 // the 20 seconds here means that the cache is only used within 20sec during startup, after that,
24 // complexity goes up and we'd have to update the cache in order to avoid subtle bugs
25 // just not using the cache is way easier then, since it doesn't make *that* much of a difference,
26 // anyway
27 int maxCacheAge = 20;
28 qint64 pluginCacheAge = 0;
29 QHash<QString, QList<KPluginMetaData>> pluginCache;
30};
31
32}
33
34#endif
35

source code of kpackage/src/kpackage/private/packageloader_p.h