pi icon indicating copy to clipboard operation
pi copied to clipboard

Why module.meta.php is used to cache module data

Open linzongshu opened this issue 9 years ago • 5 comments

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:

  1. 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.

  2. 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

linzongshu avatar Apr 02 '16 10:04 linzongshu

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 avatar Apr 02 '16 11:04 Marc-pi

@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 avatar Apr 02 '16 15:04 linzongshu

@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 avatar Apr 02 '16 16:04 Marc-pi

@Marc-pi The only thing you need to do is:

  1. Fetching the clean var and www folder and deploying them to new positions;
  2. Config a new domain in your web server, and specify its path to your new www path;
  3. Setup Pi, and remember to change the usr and lib path to shared usr and lib path in the second step;
  4. Using new database config in third step.

linzongshu avatar Apr 03 '16 07:04 linzongshu

@linzongshu thanks, will try. it will permit us the share server costs.

Marc-pi avatar Apr 03 '16 17:04 Marc-pi