cutelyst 4.0.0
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
memcachedsessionstore.h
1/*
2 * SPDX-FileCopyrightText: (C) 2017-2022 Matthias Fehring <mf@huessenbergnetz.de>
3 * SPDX-License-Identifier: BSD-3-Clause
4 */
5#ifndef CUTELYSTMEMCACHEDSESSIONSTORE_H
6#define CUTELYSTMEMCACHEDSESSIONSTORE_H
7
8#include <Cutelyst/Plugins/Session/session.h>
9#include <Cutelyst/cutelyst_global.h>
10
11namespace Cutelyst {
12
13class Application;
14class MemcachedSessionStorePrivate;
15
72class CUTELYST_PLUGIN_MEMCACHEDSESSIONSTORE_EXPORT MemcachedSessionStore final : public SessionStore
73{
74 Q_OBJECT
75 Q_DECLARE_PRIVATE(MemcachedSessionStore) // NOLINT(cppcoreguidelines-pro-type-reinterpret-cast)
76 Q_DISABLE_COPY(MemcachedSessionStore)
77public:
83 MemcachedSessionStore(Application *app, QObject *parent = nullptr);
84
89
90 QVariant getSessionData(Context *c,
91 const QByteArray &sid,
92 const QString &key,
93 const QVariant &defaultValue) override;
94
95 bool storeSessionData(Context *c,
96 const QByteArray &sid,
97 const QString &key,
98 const QVariant &value) override;
99
100 bool deleteSessionData(Context *c, const QByteArray &sid, const QString &key) override;
101
102 bool deleteExpiredSessions(Context *c, quint64 expires) override;
103
108 void setGroupKey(const QByteArray &groupKey);
109
110private:
111 std::unique_ptr<MemcachedSessionStorePrivate> d_ptr;
112};
113
114} // namespace Cutelyst
115
116#endif // CUTELYSTMEMCACHEDSESSIONSTORE_H
The Cutelyst Application.
Definition: application.h:43
The Cutelyst Context.
Definition: context.h:38
Memcached based session store.
The Cutelyst namespace holds all public Cutelyst API.
Definition: Mainpage.dox:8