cache - again

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
mikemcvey
Forum Members
Forum Members
Posts: 61
Joined: Tue May 02, 2006 4:08 am

cache - again

Post by mikemcvey »

Hi,

I am using ver 13 which I thought had caching turn off although is that just for smarty templates?

Anyway I am using the catalog module and have to clear the cache to view the new content.

I search through the files and found that in the file

class.content.inc  it had the code:

$this->mCachable = true;

I have changed this to false... seems to work.
is this going to affect performance or have any other effects (good or bad).

Mike
mikemcvey
Forum Members
Forum Members
Posts: 61
Joined: Tue May 02, 2006 4:08 am

Re: cache - again

Post by mikemcvey »

Actually that didn't work.

How can I set up a site so that all content is new .. NO CACHE at all of smarty content etc...
cyberman

Re: cache - again

Post by cyberman »

mikemcvey wrote: although is that just for smarty templates?
If you read the smarty docu you will found out 'false' should be the smarty default  ;) . It will be faster too.
mikemcvey wrote: I have changed this to false... seems to work.
mikemcvey wrote: Actually that didn't work.
Does it work or not  ??? ?

You can switch off caching in content options too ...
mikemcvey
Forum Members
Forum Members
Posts: 61
Joined: Tue May 02, 2006 4:08 am

Re: cache - again

Post by mikemcvey »

Hi,

I have tried everything and still the cache is retaining content from the catalogue. I have hacked the core code of the module in order for it to generate an order form. Not sure wether that would have made any diffference.

Anyway I am hoping to be able to resolve by clearing the cache after the user submits the changes..

Can I  use this
_______________________________________________________
#Clear cache
$smarty = new Smarty_CMS($config);
$smarty->clear_all_cache();
$smarty->clear_compiled_tpl();
_______________________________________________________

I searched the source code and this pooped up. If I include that in a module action file will it clear the cache?

Mike
Post Reply

Return to “Developers Discussion”