blob: 0e23443c6cab707e0e3755acd32981fee8f6bc18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/* ISC license. */
#include <stdint.h>
#include <skalibs/tai.h>
#include <skalibs/avltree.h>
#include <shibari/dcache.h>
#include "dcache-internal.h"
void dcache_clean_expired (dcache_t *z, tain const *stamp)
{
for (;;)
{
uint32_t i ;
if (!avltree_min(&z->by_expire, &i)) break ;
if (tain_less(stamp, &DNODE(z, i)->expire)) break ;
dcache_delete(z, i) ;
}
}
|