aboutsummaryrefslogtreecommitdiff
path: root/src/cache.h
blob: 944aa2438b46adb2b0dcabad80b230007c9ba389 (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:
		int 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