Hi,

I have a question about Advance Cache. For example caching of nodes.... Lets say I have mynode type of node with some cck fields in it. For the presentation, I am using node-mynode.tpl.php in order to have a nice display of node. However in the template file, I also have some additional stuff: custom sql queries etc...

As I understand, advance cache will cache only node elements that are defined for that node, and not additional stuff that I have in templates (sql etc...). That additional stuff will still be executed, on every page load, right? I guess for all the additional stuff that is not cached, I should implement my own caching mechanism, using cache_get, cache_set and cache_clear_all ?

Thanks in advance

k.

Comments

robertdouglass’s picture

Status: Active » Fixed

That's a correct analysis. The node caching code caches the node object as it looks at the end of node_load, which includes after running through nodeapi. What happens to the node object after that can vary widely. One outcome is for it to go to the theme layer (your .tpl.php file). Anything that happens after node_load is not cached by advcache code.

gurukripa’s picture

Title: Just a simple question » Caching help for Newbies
Status: Fixed » Active

Hi

There are many who would want to use this wonderful module made by you. However there is one major issue. Many people dont know how to patch the files. So could you attach the fully patched files in each case rather than the patches. This way even a newbie not to familiar with patching can use it.

Also, would be nice, if you gave some instructions on how to roll back if something went wrong.

THanks

robertdouglass’s picture

Status: Active » Fixed

Please don't hijack issues... open new ones if you have a new question or request.

I won't include patched files. There have been myriad discussions on why this is a bad idea, please search around for them.

As for reverting patches, the patch tool itself can tell you this:
# to get extensive instructions on patch
man patch

# to get concise instructions on patch
patch --help

If you patched a file like this:

patch < path/to/patch

you can revert the patch like this:

patch -R < path/to/patch

gurukripa’s picture

i am sorry for hijacking the issue..

thanks for writing back...
i somehow am not able to patch the files...

i wonder if u can put up the files somewhere maybe in ur site..so i can download for Drupal 5.1
thanks

Anonymous’s picture

Status: Fixed » Closed (fixed)