pi
pi copied to clipboard
Why module.meta.php is used to cache module data
Module data already store into database when modules are operated (create, update, disable), but I find a module.meta.php is created and updated when modules been operated, and it provides module data each execution. This design might occur two problem:
-
If the permission of module.meta.php is not 777, its data will not be update when a module is created. We will find that module installed successful but its actions are still not found.
-
When you deployed codes into multiple server, and then do the module operation. It's a problem to synchronize the config to other servers.
@taiwen
well, we have several cache issue there too. in fact, we do not use cache on our sites.
- first part is to update ZF to be able to use OpCache.
- then we need to add browser cache to Pi (expires, lifetime, etc : there is already a start work on this)
- and fix issues
@linzongshu seems you are using the multi-site feature of Pi ? is it possible to install once the core code (/var, /lib, /usr) and run several websites (/www directories) on this only 1 core?
@Marc-pi No, I just use Pi for only one site, and I want deploy the codes to several servers, and use a LB in front of them to enhance QPS. Therefore, I need to make sure codes in each server are same.
We had did the multi-site deploy when I worked at EEFOCUS. It has so many community sites look same, and we make them share one core code. And use config files to separate them. Please refer these sites:
http://ams.eefocus.com/ http://ledlight.eefocus.com/ http://linear.eefocus.com/
@linzongshu good, that's exactly what i need (3 websites, 3db, 1 core, same modules). is there a doc somewhere or it is a custom Pi?
@Marc-pi The only thing you need to do is:
- Fetching the clean var and www folder and deploying them to new positions;
- Config a new domain in your web server, and specify its path to your new www path;
- Setup Pi, and remember to change the usr and lib path to shared usr and lib path in the second step;
- Using new database config in third step.
@linzongshu thanks, will try. it will permit us the share server costs.