I used the Boost module for performance issues, and it creates _.html files every time it serves a file from the cache. I need to write a PHP function it should call every page, even the cached ones. How can I achieve this?

closed as unclear what you're asking by kiamlaluno Feb 22 '17 at 14:45

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • I may be wrong here, but if you wanted to call a PHP function on every page, you would put it in hook_boot. I am not sure if that still applies if Boost is loading an HTML file, but I think it happens early enough where it would. Especially if your custom module has a higher weight than Boost. – Kevin Feb 22 '17 at 14:53
  • it is not working. i already tried that. – udhayakumar Feb 22 '17 at 18:10
  • It's not possible. Apache serves the page and PHP is bypassed. You can use a javascript to run the PHP. Boost 6.x has an example: boost_stats_generate, cgit.drupalcode.org/boost/tree/stats/boost_stats.php?h=6.x-1.x – mikeytown2 Feb 22 '17 at 20:40
  • where i need to put php code. – udhayakumar Feb 22 '17 at 22:50