How can I set a global variable accessible everywhere and init in the home index.php ( not the view ) ?
Anyway another question. If I require some php file in the index.php ( the same of abobe ), these required php file will be in every other pages? I mean, index.php loads every other file right? So if I use in this index.php some variable I can access them in other files?
if it's for the entire app, add it to the global state
This is what I need to do at the application level. So, where is the "global" state and how do I modify it?
What I need is to be able to get a list of records and have them available to the entire application at all times. It’s a small list but the point is that it is not a single value. In other languages I’ve gotten this once and stored it in the cache. When it gets removed from the cache, I retrieve the values again and store it in the cahce. What would be the best way to go about this with yii.
Are there any examples of working with the cache you can point me to?