7
While doing this might seem like a good idea does come with some complications, storing Vars within a $_SESSION could create more problems than it would solve, plus the security issues on a sharded host.
Also, the other problem you may come across with this is an out of date data, this could happen if someone else changes or deletes the data within your categories.
You could call it 'static'ly or if your version of MySQL allows, you could cache the SQL query. Look at the MySQL manual for this.
Catz