break up cachetable_flush_cachefile into smaller, more digestable functions