Why don't you put the data linked to the session in the session itself (obviously not in the session cookie, but on the server side)? I guess CodeIgniter provides some facility to store session data on the server side (without using APC).
Your hand-crafted solution may work but seems an unconventional way to solve a very standard problem. In plain PHP I just use $_SESSION['foo'] = 'bar'
after a session_start()
to store session data on the server side. The session cookie only stores the session ID.
This article explains how to use native PHP sessions with CodeIgniter. Native PHP sessions are backed by plain files, purged on a regular basis. If the session data is very large, you may consider storing it in the database.
Whatever solution you choose, my advice is to keep it simple and use standard solutions.