mail-cache-decisions.c revision 8aacc9e7c84f8376822823ec98c2f551d4919b2e
/* Copyright (C) 2004 Timo Sirainen */
#include "lib.h"
#include "write-full.h"
#include "mail-cache-private.h"
#include <stddef.h>
static void
enum mail_cache_decision_type type)
{
/* update the header without locking, we'll just write one byte and
it's very unlikely someone else tries to write different value for
it at the same time. even then it's just a wrong decision which
will be corrected sometimes later, not too bad.. */
offsetof(struct mail_cache_header,
field_usage_decision_type) + idx) < 0) {
}
}
enum mail_cache_field field)
{
const struct mail_index_header *hdr;
unsigned int idx;
/* a) forced decision
b) not cached, mail_cache_mark_missing() will handle this
c) permanently cached already, okay. */
return;
}
/* see if we want to change decision from TEMP to YES */
return;
/* a) nonordered access within this session. if client doesn't
request messages in growing order, we assume it doesn't
have a permanent local cache.
b) accessing message older than one week. assume it's a
client with no local cache. if it was just a new client
generating the local cache for the first time, we'll
drop back to TEMP within few months. */
} else {
}
}
enum mail_cache_field field)
{
unsigned int idx;
/* a) forced decision
b) we're already caching it, so it just wasn't in cache */
return;
}
/* field used the first time */
}