Mercurial > dovecot > core-2.2
comparison src/lib-index/mail-cache-private.h @ 22611:65ada9976a7f
lib-index: Add mail_index_cache_optimization_settings
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Mon, 09 Oct 2017 15:37:51 +0300 |
parents | 7ae75b9c0a23 |
children | 105a2e1fd770 |
comparison
equal
deleted
inserted
replaced
22610:bf758ce6ee6d | 22611:65ada9976a7f |
---|---|
5 #include "mail-index-private.h" | 5 #include "mail-index-private.h" |
6 #include "mail-cache.h" | 6 #include "mail-cache.h" |
7 | 7 |
8 #define MAIL_CACHE_MAJOR_VERSION 1 | 8 #define MAIL_CACHE_MAJOR_VERSION 1 |
9 #define MAIL_CACHE_MINOR_VERSION 1 | 9 #define MAIL_CACHE_MINOR_VERSION 1 |
10 | |
11 /* Drop fields that haven't been accessed for n seconds */ | |
12 #define MAIL_CACHE_FIELD_DROP_SECS (3600*24*30) | |
13 | |
14 /* Never compress the file if it's smaller than this */ | |
15 #define MAIL_CACHE_COMPRESS_MIN_SIZE (1024*32) | |
16 | |
17 /* Compress the file when n% of records are deleted */ | |
18 #define MAIL_CACHE_COMPRESS_DELETE_PERCENTAGE 20 | |
19 | |
20 /* Compress the file when n% of rows contain continued rows. | |
21 200% means that there's 2 continued rows per record. */ | |
22 #define MAIL_CACHE_COMPRESS_CONTINUED_PERCENTAGE 200 | |
23 | |
24 /* Compress the file when we need to follow more than n next_offsets to find | |
25 the latest cache header. */ | |
26 #define MAIL_CACHE_HEADER_FIELD_CONTINUE_COUNT 4 | |
27 | |
28 /* If cache record becomes larger than this, don't add it. */ | |
29 #define MAIL_CACHE_RECORD_MAX_SIZE (64*1024) | |
30 | 10 |
31 #define MAIL_CACHE_LOCK_TIMEOUT 10 | 11 #define MAIL_CACHE_LOCK_TIMEOUT 10 |
32 #define MAIL_CACHE_LOCK_CHANGE_TIMEOUT 300 | 12 #define MAIL_CACHE_LOCK_CHANGE_TIMEOUT 300 |
33 | 13 |
34 #define MAIL_CACHE_IS_UNUSABLE(cache) \ | 14 #define MAIL_CACHE_IS_UNUSABLE(cache) \ |