TreeFrogFramework  1.29
tcache.h
Go to the documentation of this file.
1 #ifndef TCACHE_H
2 #define TCACHE_H
3 
4 #include <TGlobal>
5 
6 class TCacheStore;
7 
8 
10 public:
11  TCache();
12  ~TCache();
13 
14  bool set(const QByteArray &key, const QByteArray &value, int seconds);
15  QByteArray get(const QByteArray &key);
16  void remove(const QByteArray &key);
17  void clear();
18 
19  static bool compressionEnabled();
20 
21 private:
22  TCacheStore *_cache {nullptr};
23  int _gcDivisor {0};
24 
27 };
28 
29 #endif // TCACHE_H
T_DISABLE_COPY
#define T_DISABLE_COPY(Class)
Definition: tglobal.h:209
T_DISABLE_MOVE
#define T_DISABLE_MOVE(Class)
Definition: tglobal.h:213
T_CORE_EXPORT
#define T_CORE_EXPORT
Definition: tglobal.h:79
TCache
The TCache class stores items so that can be served faster.
Definition: tcache.h:9