aboutsummaryrefslogtreecommitdiff
path: root/src/cache.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/cache.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/cache.h b/src/cache.h
new file mode 100644
index 0000000..944aa24
--- /dev/null
+++ b/src/cache.h
@@ -0,0 +1,33 @@
1#ifndef CACHE_H
2#define CACHE_H
3
4#include <stdint.h>
5#include <time.h>
6#include "serializable.h"
7#include <list>
8#include <map>
9#include <string>
10
11class Cache : public Serializable
12{
13public:
14 Cache();
15 virtual ~Cache();
16
17 virtual void serialize( class Serializer &ar );
18
19 class Entry
20 {
21 public:
22 int tCreated;
23 std::list<std::string> lData;
24 };
25
26 Entry *get( const std::string &id );
27 void put( const std::string &id, Entry *data );
28
29private:
30 std::map<std::string, Entry *> mCache;
31};
32
33#endif