Allow to flush only expired items

Before I work on tests and docs, would you accept this kind of change ?