Title, these data are some common data (such as site information, etc.). A friend of mine asked me if I wanted to pass variables across the controller in Yii, and I said that in the configuration file and using Redis and memcache, he couldn't say well. At last I said throw it to the session and then be despised. What do you think of it?
ps:一个刚出道的php请教。
Reply content:
Title, these data are some common data (such as site information, etc.). A friend of mine asked me if I wanted to pass variables across the controller in Yii, and I said that in the configuration file and using Redis and memcache, he couldn't say well. At last I said throw it to the session and then be despised. What do you think of it?
ps:一个刚出道的php请教。
If all users share information can be put in the cache, but also have to have persistent storage, for the unchanging data can be placed in the configuration file;
If it is a single session of the user data, the session is not a problem, I do not know what your friends have a brilliant idea
It's OK to save some global data, as long as it's not too big. If it's just a temporary deposit, it's good to delete it.