X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Disable caching for some templates inside a php file. (https://forum.x-cart.com/showthread.php?t=2164)

Alan 04-04-2003 05:47 PM

Disable caching for some templates inside a php file.
 
Hello everyone,

I'm trying to enable caching on most part of my pages, and disable caching on a few selected templates that generates data dynamically.

I'd like to split up my home.php into 5 sections with header, left col, main col, right col, and footer. The overal template will be fitted inside a table that wraps the left, main and right template.

Now the question is, I'd like to cache everything but the left template. Might anyone be able to give me some pointers?

Thank you. :wink:

funkydunk 04-05-2003 01:04 AM

just one question .. why? :)

Alan 04-14-2003 07:40 PM

I figured that it'd be faster for users to surf our sites, as we have a dynamic center and right column, and a fixed top, left and bottom column. Doesn't caching part of templates speeds up the website, and mimimize unnecessary SQL calls? Sorry I'm still quite a newbie at PHP related items...

What I really want is to just speed the site up with minimized SQL callings, and other bits.

B00MER 04-14-2003 08:53 PM

Smarty-2.3.0/Smarty.class.php

Code:

var $caching =  0; // enable caching. can be one of 0/1/2.
// 0 = no caching
// 1 = use class cache_lifetime value
// 2 = use cache_lifetime in cache file
// default = 0.
var $cache_dir = 'cache';


By default x-cart will not cache any .tpl's

:arrow: http://smarty.php.net/manual/en/variable.caching.php

Alan 04-16-2003 07:45 PM

Hello again all.

What are the advantages and disadvantages of caching for smarty anyway? I'm still at lost wtih these advanced internal PHP stuff...


All times are GMT -8. The time now is 11:19 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.