Like, apparently, a good many in this particular corner of the Postnuke forums, I am having a crack at teaching myself how to develop a module by slogging my way through the Example files (my understanding is that this is the recommended learning process, and I have also gotten the notion from somewhere that the Example templates are more suitable than the Template templates for a module in a pnRender/Xanthia context - I could always have the wrong end of the stick, here). And I come across what has always been my biggest Postnuke headache - caches.
I am using a Xanthia theme (pnDefault-based). So I deactivate Xanthia caching and make some changes to my module - let's call it pnFirst (it is not very relevant, but my immediate objective is to get new variables to display - for the moment, I can input but not output). After I have fiddled around for a while, it becomes clear that the changes to pnFirst are not being reflected on screen. Dang. Just to make sure, in lang/eng/admin.php, I change a language constant for the "admin_modify" template. The constant is '_TESTINGEDIT,' in English normally "Edit this item," and I alter it to read something whimsical like "Sod this for a lark." I go back to the Xanthia configuration menu and make sure "Check for updated version of templates" and "Force templates recompilation" are checked and "Store templates in database" is not. I still see "Edit this item" instead of "Sod this for a lark." Double dang. I use phpMyAdmin to check that there are no template-like things being stored in the database, and if there are, I can't recognise them as such. I meander aimlessly around the forum for a while, and am reminded that pnRender does its own caching, so I make sure it is disabled, and also click "Delete cached pages." I still see "Edit this item" instead of "Sod this for a lark," inexplicably even when I change the theme to ExtraLite. I take a look at the contents of pnTemp and delete almost everything in sight. Viciously. I still see "Edit this item" instead of "Sod this for a lark," but am coming round to the latter opinion.
Now, if I work on the module on a test version of the site (where I have already seen "Sod this for a lark" and changed it back again), with pnRender and Xanthia deactivated or removed, I avoid the caching problem altogether, but it doesn't seem the best way to go if the end idea is for pnFirst to work with a Xanthia theme. So where is the cache or caches and how do I turn it/them off?
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Caching problems
-
- Rank: Freshman
- Registered: Dec 16, 2003
- Last visit: Oct 21, 2009
- Posts: 52
-
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
This might help you.
$pnRender->caching=false;
you can set that for a particular function to no have it cache. There is another line the actual template files, but i dont know it off the top of my head. -
- Rank: Freshman
- Registered: Dec 16, 2003
- Last visit: Oct 21, 2009
- Posts: 52
I think it's the same, $pnRender->caching = false - it repeats five times in the pnadmin.php template, once for each function. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Apr 18, 2005
- Posts: 3
I use sysv shared memory caching and it works wonderful. Just add a little code to my index.php file, and it works wonders on my site. http://www.adamstevenson.net/mycached.phps
Just add this code right after
pnInit();
at the top of index.php, and download mycached.php
if(!pnUserLoggedIn()){
include 'mycached.php';
do_cache();
} -
- Rank: Expert
- Registered: Dec 31, 1969
- Last visit: Oct 21, 2009
- Posts: 1437
- Moderated by:
- Support
Users on-line
- 0 users
This list is based on users active over the last 60 minutes.
