Automatically cleanup cache once a day on the dedicated server.

This commit is contained in:
lotodore
2007-10-25 21:20:35 +00:00
parent d0cea553df
commit d0c34c572b
4 changed files with 31 additions and 12 deletions
+8
View File
@@ -29,6 +29,14 @@
#include <fstream>
#include <cstring>
#ifdef POKERTH_DEDICATED_SERVER
#define MAX_NUMBER_OF_FILES 1024
#define MAX_AVATAR_CACHE_AGE 2592000 // 1 Month
#else
#define MAX_NUMBER_OF_FILES 256
#define MAX_AVATAR_CACHE_AGE 2592000
#endif
#define PNG_HEADER "\x89\x50\x4e\x47\x0d\x0a\x1a\x0a"
#define PNG_HEADER_SIZE (sizeof(PNG_HEADER) - 1)
#define JPG_HEADER "\xff\xd8"