Currently, there is no way to clear caches. For a DiskCache, this snippet does not seem to work (edit: the remove_expired_entries logic is broken, see #198 for a fix):
// This does not seem to work:
let lifespan = cache.cache_set_lifespan(0);
cache.remove_expired_entries();
match lifespan {
Some(lifespan) => {
cache.cache_set_lifespan(lifespan);
}
None => {
// Uhh...
}
}
Additionally, there's no method to remove the lifespan, so if there wasn't an expiration policy set before we called cache_set_lifespan there's no way to restore that state when we're done.
Currently, there is no way to clear caches. For a
DiskCache
, this snippet does not seem to work (edit: theremove_expired_entries
logic is broken, see #198 for a fix):Additionally, there's no method to remove the lifespan, so if there wasn't an expiration policy set before we called
cache_set_lifespan
there's no way to restore that state when we're done.