21
amok200
Re: Module-wide caching - Important development
  • 2004/4/23 16:20

  • amok200

  • Just popping in

  • Posts: 68

  • Since: 2004/2/23


Thanks Mith for explaining.

I am confused about a couple of things.

1) What about modules that don't use templates and/or don't have a header.php ? Am I right in thinking they are not affected by this problem ? Or does that mean they are not able to be cached ?

2) Do I only have to change the header.php file in each module (where it exists) ?

Thank you,

amok

22
Dave_L
Re: Module-wide caching - Important development
  • 2004/4/23 18:55

  • Dave_L

  • XOOPS is my life!

  • Posts: 2277

  • Since: 2003/11/7


The header.php discussed above is the one in the top-level XOOPS directory.

The module's header.php may or may not have to be changed. It depends on where the module is including the main header.php, and what processing is done prior to that.

The point is that the main header.php handles module-wide caching. So if a module does any processing that should be cacheable, it must be done after including the main header.php. Otherwise that processing will be done all the time, regardless of the cache setting.

I'm not sure about the template issue.

23
Mithrandir
Re: Module-wide caching - Important development

If a module does not use templates, it is not cached and will not be affected in any way by the module-wide caching settings.

The root/header.php should not in any way be modified.

The only thing, which needs modification in some module pages is the ORDER of including header.php and setting the template to use.

If the page uses templates, it should include mainfile, then set the template to use, then include the root/header.php and then the code to fetch data in the database etc. etc. etc.

Also, any access restrictions etc. should go before the inclusion of header.php, but not too much data manipulation or database calls - otherwise you will lose the advantage of the caching.

24
sottwell
Re: Module-wide caching - Important development
  • 2004/6/26 9:25

  • sottwell

  • Just popping in

  • Posts: 30

  • Since: 2004/6/23


Greetings!

I just put a tutorial in the Wikki for creating a module with a form. I have made a correction to the applicable file. Could someone check it for me please and make sure I got it right?

XoopsWikki:FormHowTo

sottwell

25
guardian2k1
Re: Module-wide caching - Important development

Would this glitch include the modules that come with the XOOPS itself. i.e. mylinks, mydownloads, xoopsfaq....
"Linux is extremely user-friendly. It also happens to be extremely selective when picking its friends."

http://www.nuxified.com |http://debcentral.org

26
jonr_is
Re: Module-wide caching - Important development
  • 2006/3/7 0:12

  • jonr_is

  • Just popping in

  • Posts: 32

  • Since: 2006/1/2 1


How do I make my modules show up in the Module-Wide Cache in the General Setting page? How do I know if my modules are cached and the cache time?

J.
Now on Xoops: 4-3system.com

Login

Who's Online

140 user(s) are online (78 user(s) are browsing Support Forums)


Members: 0


Guests: 140


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