Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Disable caching for some templates inside a php file.

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 04-04-2003, 05:47 PM
 
Alan Alan is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 83
 

Default 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.
__________________
Best Regards!
Alan
Search is my friend
Reply With Quote
  #2  
Old 04-05-2003, 01:04 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

just one question .. why?
__________________
ex x-cart guru
Reply With Quote
  #3  
Old 04-14-2003, 07:40 PM
 
Alan Alan is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 83
 

Default

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.
__________________
Best Regards!
Alan
Search is my friend
Reply With Quote
  #4  
Old 04-14-2003, 08:53 PM
  B00MER's Avatar 
B00MER B00MER is offline
 

X-Guru
  
Join Date: Sep 2002
Location: Keller, TX (Cart-Lab.com)
Posts: 3,165
 

Default

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

http://smarty.php.net/manual/en/variable.caching.php
__________________
Cart-Lab - 100+ Social Bookmarks for X-Cart.
Reply With Quote
  #5  
Old 04-16-2003, 07:45 PM
 
Alan Alan is offline
 

Advanced Member
  
Join Date: Feb 2003
Posts: 83
 

Default

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...
__________________
Best Regards!
Alan
Search is my friend
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:55 AM.

   

 
X-Cart forums © 2001-2020