I am running a web application that allows the user to log in. The user can add / remove content to his "library", which is displayed on a page with the name "library.php". Instead of querying the database for the contents of the user library each time they load "library.php", I want to store it globally for PHP when the user logs in, so the query is only launched once. Is there any best practice for this? FX saving their library in an array in a session?
thank you for your time
source
share