time_t now = get_seconds();
h->next = NULL;
h->flags = 0;
- atomic_set(&h->refcnt, 0);
+ atomic_set(&h->refcnt, 1);
h->expiry_time = now + CACHE_NEW_EXPIRY;
h->last_refresh = now;
}
void cache_purge(struct cache_detail *detail)
{
- detail->flush_time = get_seconds()+1;
+ detail->flush_time = LONG_MAX;
detail->nextcheck = get_seconds();
cache_flush();
+ detail->flush_time = 1;
}