1
Mithrandir
Update Module Cache in real time

I'm experimenting with the XoopsModule hack to update the cache in real time and it's working quite nicely.

However, a few quirks are still at large:

a) It takes a few refreshs for the cache to kick in - I don't know if that's a problem with the hack or with XOOPS in general, but anyway it doesn't look like the update is happening as it is supposed to in the hacked method on XoopsModule

b) This is nothing to do with the hack itself but more to do with module writers and the use of logic to determine submenu items, but every time the main menu is loaded, it goes through the xoops_version.php and thus also the code to determine submenu items - this happens even if you are viewing a page in another module. Now, the question is whether one should put in some checks to only display submenu items if the page viewed is in this module or whether one just has to accept this. A check in xoops_version.php like this
global $xoopsModule;
if (
$xoopsModule->getVar('dirname') == 'module_name') {
  
// Build submenu items
}

would resolve it, but put off JavaScript/DHTML expanding menus. However, it is really a bitch, when I'm trying to get the front page to load with as few SQL queries as possible that such things are there. I am currently at 18 queries, 7 of which come from modules' xoops_version.php and 11 which are impossible to get rid of.

2
phppp
Re: Update Module Cache in real time
  • 2004/7/12 14:17

  • phppp

  • XOOPS Contributor

  • Posts: 2857

  • Since: 2004/1/25


Quote:

Mithrandir wrote:
a) It takes a few refreshs for the cache to kick in - I don't know if that's a problem with the hack or with XOOPS in general, but anyway it doesn't look like the update is happening as it is supposed to in the hacked method on XoopsModule


I did not have this problem, or I was just blind to it?
will check it later

3
Mithrandir
Re: Update Module Cache in real time

a) solved as it was due to me updating system preferences, which clears the cache.

Login

Who's Online

99 user(s) are online (61 user(s) are browsing Support Forums)


Members: 0


Guests: 99


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits