hi
i am lost on how to use this module. i understood that i have to upload the untarred file to the modules folder and enable it.
after that i understand that i have to patch it to some other modules(RIGHT??)
how do i patch it...the word patch is probably jargon and i dont understand it well...
can you please explain to a complete newbie...the full process of what has to be done.
am afraid to activate it otherwise, since you warn of huge speed issues, if i goof up..
thanks

Comments

robertdouglass’s picture

Status: Active » Fixed

Yes, you are correct to be afraid =) If you have never patched Drupal code before, then you'd better practice a bit (not on your live site) before you apply these patches. Furthermore, you should absolutely make sure to have a test site which is a separate copy of your live site, and go through the process there before trying it on your live site. And you should always have a backup copy of your live site ready in case anything goes wrong. But that's all just general good advice.

To patch, you open up a shell and move into your root Drupal directory. For example, on my machine that looks like this:

cd /var/www/drupal

The module is installed in /var/www/drupal/sites/all/modules/advcache. To apply a patch, I do this (remember that I'm already in the drupal root):

patch < sites/all/modules/advcache/node_cache.patch

The patch program runs and asks me to confirm the location of the node.module. I do this and then it tells me whether any of the hunks of the patch failed. If none failed, then I've succeeded.

As you can see, when everything works right patching is easy. Just make sure you're prepared for things not working right. It is also perfectly acceptable to patch the files locally, test them, and then FTP them to your live site. Just keep track of which files you've patched.

gurukripa’s picture

well...i dont know what is shell..
if its a matter of copy and pasting things..i can do that..
like if u mention which line number etc..i have an editor called VIM..

but i dont know what is shell..and am not familiar with these commands..sorry for being so ignorant..but i can learn..if u be a little more basic with the steps :)

thanks

robertdouglass’s picture

Shell is also called the command line or terminal. There are other programs which can do patching as well. Please use google to read about patching. You could potentially edit the files by hand but it would be an enormous task and very likely to introduce errors, so please don't try it.

kalashari’s picture

Does it make a difference when I patch files from Unix (my host) on my computer (windows), then put them back to my host?

Since there are differences in line endings in patch files on win and unix... On win, I have to save patch file as a txt file, and THEN I can patch it.

robertdouglass’s picture

I don't really know the answer to that question.

kalashari’s picture

ok I applied a patch from here: http://drupal.org/node/100301

and it worked... reduced num of queries a lil bit.... I am still very interested in your module.

kalashari’s picture

OK I just installed your module and applied only node_cache.patch

So now, my question is... are all authenticated users being served cached nodes? I Mean I dont have any roles, I just have Anonnmuses and Authenticated users...

I just looked in DB, "cache_node" table is being filled in as I'm browsing through different nodes as authenticated user. I guess it's a good sign? :-)

this is my production site: http://tranceplanet.org/

robertdouglass’s picture

That should be right. Authenticated users who only have one role will be served cached nodes. Of course the cache gets updated when nodes change (edited or deleted). If you have the devel module turned on and are looking at the queries, you'll notice that the query from node_load isn't run with the node caching patch applied.

kalashari’s picture

Do you know if your cache_path.patch will be in conflict with a patch from here: http://drupal.org/node/100301 (I have that one applied)

Since that patch already made a "cache_path" table in a DB.

kalashari’s picture

Applied a comment_cache.patch just now

for nodes without any comments it gives me an error:

warning: Invalid argument supplied for foreach() in /home/trancepl/public_html/modules/comment/comment.module on line 1060.

robertdouglass’s picture

@kalashari: Please create a new issue to report bugs.

Anonymous’s picture

Status: Fixed » Closed (fixed)