forgotten saving of flags properly in sql cache