From e2c430b237da5c0229fd8e0832eedc3b85045ec0 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 12 Sep 2006 17:30:23 +0000 Subject: Added cache functionality, which is really nice, things go much faster now. --- src/cache.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/cache.h (limited to 'src/cache.h') 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 @@ +#ifndef CACHE_H +#define CACHE_H + +#include +#include +#include "serializable.h" +#include +#include +#include + +class Cache : public Serializable +{ +public: + Cache(); + virtual ~Cache(); + + virtual void serialize( class Serializer &ar ); + + class Entry + { + public: + int tCreated; + std::list lData; + }; + + Entry *get( const std::string &id ); + void put( const std::string &id, Entry *data ); + +private: + std::map mCache; +}; + +#endif -- cgit v1.2.3