TreeFrogFramework  1.27
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 {
11 public:
12  TCache();
13  ~TCache();
14 
15  bool set(const QByteArray &key, const QByteArray &value, int seconds);
16  QByteArray get(const QByteArray &key);
17  void remove(const QByteArray &key);
18  void clear();
19 
20  static bool compressionEnabled();
21 
22 private:
23  TCacheStore *_cache {nullptr};
24  int _gcDivisor {0};
25 
28 };
29 
30 #endif // TCACHE_H
#define T_CORE_EXPORT
Definition: tglobal.h:82
#define T_DISABLE_COPY(Class)
Definition: tglobal.h:180
#define T_DISABLE_MOVE(Class)
Definition: tglobal.h:184
The TCache class stores items so that can be served faster.
Definition: tcache.h:9