We had to introduce out-of-order construction for those classes, but we forgot to implement out-of-order destruction. File gets closed first by cached_file::m_source destructor, then inherited destructor cache::~cache() which flushes the cache is called. Signed-off-by: Simon Rozman <simon@rozman.si>