This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Regardless of the second level cache implementation you choose, the mechanisms for commiting changes to the database are the same as if you were not using it, i.e. when you commit your transaction your inserts/updates/deletes are made in the database.