CakePHP custom database session handler

In cakePHP, does anyone have any experience creating a custom Session handler that records extra information to the database.

Say you wanted to record the IP and the User Id (if they login using Auth) to the sessions table using a custom handler. Where would you start?

I have seen the cakebook, but it doesn't talk about custom database session handlers.