File indexing completed on 2024-05-12 15:59:55

0001 /*
0002  *  SPDX-FileCopyrightText: 2021 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef KORESOURCECACHESTORAGE_H
0008 #define KORESOURCECACHESTORAGE_H
0009 
0010 #include <KoResourceCacheInterface.h>
0011 #include <QScopedPointer>
0012 
0013 /**
0014  * A trivial implementation of KoResourceCacheInterface that just
0015  * stores cached values.
0016  */
0017 class KRITARESOURCES_EXPORT KoResourceCacheStorage : public KoResourceCacheInterface
0018 {
0019 public:
0020     KoResourceCacheStorage();
0021     ~KoResourceCacheStorage();
0022 
0023     QVariant fetch(const QString &key) const override;
0024     void put(const QString &key, const QVariant &value) override;
0025 
0026 private:
0027     struct Private;
0028     const QScopedPointer<Private> m_d;
0029 };
0030 
0031 #endif // KORESOURCECACHESTORAGE_H