summaryrefslogtreecommitdiff
path: root/global.h
blob: 6dab01836120dee7bef2b1bb07d8469e052080b5 (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
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef GLOBAL_H
#define GLOBAL_H

#include "boardmanager.h"

/** Time the forum config settings should be considered up to date, in days. */
#define BOARD_CONFIG_TTL  2

/** Time the list of forums should be considered up to date, in days. */
#define BOARD_LIST_TTL  2

/** Time we should consider the most recent topics in a forum up to date, in seconds. */
#define FORUM_TOP_TLL 15 * 60

/** Time we should consider other topics in a forum up to date, in seconds. */
#define FORUM_TOPICS_TLL 15 * 60

/** Time we should keep topics in the cache, in days. */
#define FORUM_TOPICS_CACHE 10

/** Number of topics per "block" in subforum view */
#define FORUM_PAGE_SIZE 20

/** This is the absolute maximum page size the API will allow. */
#define MAX_FORUM_PAGE_SIZE 50

/** Time we should consider the most recent posts in a topic up to date, in seconds. */
#define TOPIC_TOP_TLL 5 * 60

/** Time we should consider other posts in a topic up to date, in seconds. */
#define TOPIC_POSTS_TLL 15 * 60

/** Time we should keep topics in the cache, in days. */
#define TOPIC_POSTS_CACHE 10

/** Number of posts per "block" in topic view */
#define TOPIC_PAGE_SIZE 20

/** This is the absolute maximum page size the API will allow. */
#define MAX_TOPIC_PAGE_SIZE 50

// Some singletons
extern BoardManager *board_manager;

#endif // GLOBAL_H