Fork me on GitHub

pnRender::getInstance default caching value  Bottom

  • In inculdes/pnRedner.class.php in method "getInstance" we have caching set in default to false.
    But while watching the usage of this method I've wonder if its not wrong.
    Probably in all modules and blocks we can find:

    Code

    $pnRender = pnRender::getInstance('module_name', false);

    in situations where caching should be turned off, and

    Code

    $pnRender = pnRender::getInstance('module_name');

    in situations where caching should be turned on.
    I supposed that this are remains after pn764 way to initialize pnRedner, where we had caching turned on in default.

    This is quite important to explain this issue, because currently it look like nothing is cached by pnRender and some thing need to be changed - the default value of "caching" argument or the pnRedner calls.

    P.S. I've submitted above above-mentioned issue to bugtracker. Here I'm posting in hope to get answer - should be (or - will it be in final release) caching in getInstance method default turned off?


    Edit: it looks like there is now problem icon_rolleyes



    edited by: Jusuff, Jul 30, 2007 - 12:52 PM

    --
    Polish Zikula Team
    Bianor Works - my Zikula works on CoZi
  • As far as I know

    Code

    $pnRender = pnRender::getInstance('module_name');

    is not for situations where caching should be turned on in general, but where the setting defined in the pnRender admin area should be considered.

    --
    Guite | ModuleStudio
  • I am getting the following error on 0.8 when trying to access modules like Search and News and others:

    Code

    Fatal error: Call to undefined method pnRender::getinstance() in C:\Program Files\xampp\htdocs\modules\News\pnsearchapi.php on line 30


    Smarty version 2.6.18
    Compiled templates directory pnTemp/pnRender_compiled
    Compile Check is checked
    Force compilation is checked
    Enable chaching is unchecked

    Changing any of these settings are not helping. I don't really understand the new caching system as well. I have been dabbling in postnuke for years but can't seem to find any info about this error.



    edited by: jaenosjelantru, Nov 21, 2007 - 04:18 PM
  • Well,
    it seems that you're using a "pre-singleton snapshot"...

    this means that you need to download the 'new' pnRender class, and replace the your /includes/pnRender.class.php file. Unfortunately the NOC doesn't let us to download by now, so, i share it with you here (double click to download).

    Mark West implemented the singleton pattern to the pnRender class, to avoid the creation of pnRender instances every time that we need to fetch a template, and that improves the performance and memory usage, etc...
    so, all the modules changed the pnRender call from "new pnRender($modname, $cache)" to "pnRender::getInstance($modname, $cache)"...

    Good luck!

    --
    - Mateo T. -
    Mis principios... son mis fines
  • Thanks for your help, Mateo. The zip file was empty.

    Is it possible for me to just DL the latest snapshot. instead? I think I got the one from May 21. Or should I just DL the RC1 from the downloads page?
  • Mateo-

    I DL'ed the RC1 build from the Downloads page.

    News is working now, sorta. New topic I suppose..

This list is based on users active over the last 60 minutes.