blob: 16c47828515a870daca27e5a4be8c2c7217fe5d6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#ifndef CACHE_H
#define CACHE_H
#include <stdint.h>
#include <time.h>
#include "serializable.h"
#include <list>
#include <map>
#include <string>
class Cache : public Serializable
{
public:
Cache();
virtual ~Cache();
virtual void serialize( class Serializer &ar );
class Entry
{
public:
uint32_t tCreated;
std::list<std::string> lData;
};
Entry *get( const std::string &id );
void put( const std::string &id, Entry *data );
private:
std::map<std::string, Entry *> mCache;
};
#endif
|