I'm building small blog-like system for school. I need to store some data in cookie as well as save session in db and cookie. Codeigniter (CI) is saving session in database and cookie by it self if you set it on config/config.php as well as loading session library in config/autoload.php
Goal: I need to set session, email and username in cookie after login and later get it back. Kill cookie and all db data on cookie expire or logout.
Problem: CI is creating new session record in to db every single time when i reload page. it dosent realy matter which page, even on refresh it makes new INSERT in to DB.
Question: How should I stop CI of making autsave and make it save session only after login and kill session after logout?