cutelyst  3.7.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 
11 namespace Cutelyst {
12 
13 class Application;
14 class MemcachedSessionStorePrivate;
15 
68 class CUTELYST_PLUGIN_MEMCACHEDSESSIONSTORE_EXPORT MemcachedSessionStore : public SessionStore
69 {
70  Q_OBJECT
71  Q_DECLARE_PRIVATE(MemcachedSessionStore)
72 public:
78  MemcachedSessionStore(Application *app, QObject *parent = nullptr);
79 
84 
85  virtual QVariant getSessionData(Context *c, const QString &sid, const QString &key, const QVariant &defaultValue) final;
86 
87  virtual bool storeSessionData(Context *c, const QString &sid, const QString &key, const QVariant &value) final;
88 
89  virtual bool deleteSessionData(Context *c, const QString &sid, const QString &key) final;
90 
91  virtual bool deleteExpiredSessions(Context *c, quint64 expires) final;
92 
97  void setGroupKey(const QString &groupKey);
98 
99 protected:
100  QScopedPointer<MemcachedSessionStorePrivate> d_ptr;
101 };
102 
103 }
104 
105 #endif // CUTELYSTMEMCACHEDSESSIONSTORE_H
The Cutelyst Application.
Definition: application.h:43
The Cutelyst Context.
Definition: context.h:39
Memcached based session store.
The Cutelyst namespace holds all public Cutelyst API.
Definition: Mainpage.dox:8