11
Dave_L
Re: Module-wide caching - Important development
  • 2004/2/1 0:42

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


If I understand this correctly, then if the module is "cached", the exit() in header.php will be reached, so that the "Main code area" won't be executed. Is that right?

12
Mithrandir
Re: Module-wide caching - Important development

Yes, that is correct.

The line before that is the smarty function to display the page, so no more processing is necessary.

13
DobePhat
Re: Module-wide caching - Important development
  • 2004/2/2 23:35

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


Just want to touch base....this could be the cache problem Ive had for almost a year...wherein every module I tried to cache would not quite cache correctly...it's get stuck....


Anyways, eager to try it out...
Is this in the main Header.php file only? Or do we have to look at module files as well?

Thanks!

14
Dave_L
Re: Module-wide caching - Important development
  • 2004/2/2 23:52

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


I think that header.php is ok, it's the modules that need to be fixed. However, the only issue here is preventing modules from executing code unnecessarily. Your problem sounds different.

15
DobePhat
Re: Module-wide caching - Important development
  • 2004/2/3 0:45

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


hmmmm, your right.

I can't figure out why when I set the cache for say...
News to even as low as 30seconds....then News page index acts strange. ie: if you click on page 2 (or more news)
then it just shows the same page and not the new one....
bummer...Our site is getting larger and could benefeit from the cache feature but can't seem to get it to work right....

16
Mithrandir
Re: Module-wide caching - Important development

Quote:

DobePhat wrote:
Anyways, eager to try it out...
Is this in the main Header.php file only? Or do we have to look at module files as well?

It is ONLY in the module files, the problem lies.

In module files, you include mainfile.php (usually as one of the first lines), header.php (very commonly in succession to mainfile.php and footer.php (last line)

The solution is to consider, when to include header.php in the module files, and wait until the $xoopsOption['template_main'] is set.

All in module files.

17
DobePhat
Re: Module-wide caching - Important development
  • 2004/2/10 5:34

  • DobePhat

  • Friend of XOOPS

  • Posts: 656

  • Since: 2003/4/15


ok Im sorry but...could you clarify...

Which module then, brought this issue up...and is it a third party module? Or is this something we should change in all modules?

Is there a quick way to do that?

Thanks!

18
Mithrandir
Re: Module-wide caching - Important development

It is practically every module out there.
News module is one of the few not requiring a change.

Unfortunately, I don't see a quick way to do this.

19
amok200
Re: Module-wide caching - Important development
  • 2004/4/23 14:54

  • amok200

  • Just popping in

  • Posts: 68

  • Since: 2004/2/23


Hi,

Yes Draven, great find, thanks.

It would be more efficient to release a fix/change to how module-wide caching works rather than have everyone go through every module and change every file.

Is this something possible for the core team ?

Thanks all,

amok

20
Mithrandir
Re: Module-wide caching - Important development

Eh? I don't see how it is possible to do what you ask for. It would be a very very substantial change to how module-wide caching works and I don't see that it is a big task to change the modules to do this the correct way.

It is a very very small change of the module files using templates. It took me about 10 minutes to do it in Team, which uses quite a lot of templates compared to the most common modules.


Login

Who's Online

229 user(s) are online (154 user(s) are browsing Support Forums)


Members: 0


Guests: 229


more...

Donat-O-Meter

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

Latest GitHub Commits