1 Blog Cacher

Wordpress plugin that caches your blog pages in order to increase the response speed and minimize the server load.

44 Comments
duard.com.br

Can you help me

I cant access my site using www

http://www.afazenda.org dont work

afazenda.org work

How do I fix it … I need access for www and without www :-)

thanks !

Javier García

Both can’t work at the same time, it’s not a plugin issue. WordPress redirects the one to the other, depending on the url specified in the installation. When I go to http://www... I am redirected, which is the expected behaviour.

Though your site is returning some Internal Server Errors from time to time. The plugin probably cached one of those errors and hence you see it when you access some urls.

Mojtaba Cazi

hi,
Your cache plugin really help me to reduce CPU time usage of my wordpress blog! but there i have some difficulties with it.
How can i disable caching for loggin users?!?

Javier García

Read the documentation, either on the files or here:
http://1-blog-cacher.javier-garcia.com/install/

S.K

Hi

I am using 1 Blog Cache plugin.
I published a fresh post but it is not showing up on the blog page. I had to remove all cached pages to view the latest post.

Could you please help me with a solution?

Thanks and regards

S.K

Javier García

The plugin deletes the cache of the index once a post is published. Probably you were seeing the browser cache.

ricardo

Hi, Javier

I´ve installed your plugin and everything looks fine. However, something goes wrong with Internet Explorer. A caracther appears only in this browser at the beggining of the page and cause a problem with the layou.

The template appears to be OK and I try to load a single page saved in another part of the site and it works. See above:

The original
http://www.blogauto.com.br/agora-da-para-dirigir-o-omega/

The copy saved in the root directory
http://www.blogauto.com.br/d41d8cd98f00b204e9800998ecf8427e.html

Could you help me, please?

Best regards,
Ricardo

Javier García

Hi Ricardo,

Sorry, i don’t see what you mean. I see things different in IE because of the CSS, but not any character at the beginning.

ricardo

Hi Javier,

in the source code of the IE there is a “square” before the text “<!DOCTYPE html PUBLIC “-//W3C…”.

When I delete it, the page load with no problem. The static page saved in wp-cache folder is OK and only IE “see” that caracther - Firefox and Chrome don’t.

Javier García

Still not seeing that character in IE. What version are you using?.

If the file saved is OK, it should be everything OK, as it’s the only thing returned to the browser along with the HTTP headers.

ricardo

I´m using IE 7 but I also tested in IE6 and IE8.

Here is the print screen of the source code in IE and Firefox. The character is inside the white mark.

http://www.blogauto.com.br/blog-cacher.jpg

Javier García

Found some info, it seems it’s a WP/theme thing, not plugin’s:

http://wordpress.org/support/topic/272302
http://wordpress.org/support/topic/181719?replies=3

ricardo

I appreciate your help, but neither the theme or the wordpress itself cause the problem.

I´ve tried to change the theme using the Wordpress default but don´t work. I follow the instructions of some topics that you suggest but nothing.

When I turn off 1 Blog Cacher plugin the blog pages work fine. If I turn on your cache plugin the square character go back.

Javier García

But read what they say. The problem is editing with Notepad or similars. If you edited the plugin, that might be very well the problem: your editor inserted that character in the plugin files, so it’s being returned. Follow the advice of editing the files with more advanced editors so that character is removed.

ricardo

Thank you, Javier, but I just switched to Hyper Cache.

Regards

Benson

Hi,

I love your plugin, it’s the best wordpress caching system available! And it’s also one of the only options available that works well that is compatible with Dreamhost PS Private servers.

I get a problem with internal server errors occasionally. It seems the error page get cached by firefox, even though I tell it not to cache them. So a user will hit refresh on their browser and the error page remains. Only a CTRL+F5 or CTRL+R command will fix the problem.

Here are my settings:
Cache error pages: No.
Rejected strings
If the url contains one of these strings, that url won’t be cached:
* wp-
* internal_error

I think the problem lays in the browser caching the error page, not in the plugin. So I added a
between the tags in my internal_error.html error page and problem fixed!

I’m not sure if this is the best way to do it, but I’ll try it out.

Benson

And again…without the brackets

I added a
META HTTP-EQUIV=”Pragma” CONTENT=”no-cache”
META HTTP-EQUIV=”Expires” CONTENT=”Tue, 04 Dec 1993 21:29:02 GMT”
between the HEAD tags in my internal_error.html error page and problem fixed!

Bill Bartmann

I’m so glad I found this site…Keep up the good work

Benson

Hmm…It looks like when an internal server error is encountered, the cached version of the error page is still served; it’s possible to get around it with a hard refresh, but hitting a simple refresh still serves the error page. My fix by adding no-cache to the error page didn’t work.

Javier García

If the server returns propery an error (http status), the page shouldn’t be cached. If this isn’t happening you can make a work-around in file advanced-cache.php to avoid caching those pages ($no_cache = true).

Michael

Hi Javier,

Firstly thanks for a great script - up and running in just a few minutes.

Can you help me out on the strings used for stopping caching please.

I am using permalinks and want to stop caching on urls like /category and /item/ - I have tried various ways but nothing seems to work for me.

Is there a correct way to enter such strings, or is it not possible please?

Many thanks and best regards,

Michael

Javier García

The plugin uses a simple strpos, so any url containing any of the OBC_REJECTED_STRINGS should make it not to cache the page.

Michael

Many thanks for your reply Javier,

Sorry but I am not a php expert. Should I be able to enter the urls as written, /item/ or /category, or is there another format I should use please?

I have tried them as written but they either do not work or give an error.

Many thanks again,

Michael

Javier García

item/, category/ etc. should do the trick if those are the kind of urls you are using.

Michael

Many thanks for your reply Javier,

I have tried “wp-”, “item/” - both with and without the ending slash and unfortunately it doesn’t work, not only that but the “wp-” also stops working and everything starting wp- gets cached.

I’m wondered of it might be the PHP version, the server is running Version 5.2.10.

Other than that everything works perfectly thanks, it just means I can’t cache for as long as I would like.

Many thanks again,

Michael

bart

Hey, your plugin seems to be working great, except it keeps me logged out. I have access to my admin panel and all, but the blog frontend doesn’t recognize that I’m logged in (”Log in” in the Meta section and having to fill in details when commenting). Can you help?

Thanks a lot,
Bart

Javier García

Depending on your configuration, that’s the expected behaviour. Check the OBC_CACHE_USERS constant.

bart

I did, and no matter what value I typed in, I still couldn’t log in to the frontend.

Javier García

What WordPress version are you using?.

bart

2.8.4, iNove theme, no other cache plugins installed.

Scot Hacker

Love the simplicity and speed of this plugin! But one thing we can’t seem to work out: My understanding is that when you save any post, it will invalidate both the cache for that permalink and the index pages that refer to it. What we’re seeing is that the permalink page is invalidated correctly but index pages don’t show our edits until the cache expires or we empty it. Is that expected behavior? Can invalidation be made a bit smarter so that category and archive and index pages are invalidated at the same time? Thanks, Scot

Javier García

Permalink and HOME PAGE caches are removed when a new post is published. Removing all the references to that new post would be quite complicated. It would be easier to simply remove all cache pages.

Scot Hacker

Hrmm… just did some testing and WP-SuperCache does do this (invalidates category page cache when posts are edited). We just moved from SuperCache to 1BlogCacher, but this gotcha is annoying our authors and editors. If it’s an either/or option, we would prefer to have the whole cache blown away upon post edit rather than be stuck with typos on the site for an hour. Can there be an option for this? Thanks.

Javier García

There’s not an option, but you can simply change the hooks at the end of 1blogcacher2.0.php (add_action…) to remove all cache pages (for instance using the function obc_remove_files.

Scot Hacker

Rather than me patching my own copy and then not being able to benefit from your upgrades, and to make sure others benefit as well, can I suggest a built-in option for that, or better yet, one that simply invalidates all category and archive pages when a post is created or updated?

Javier García

It’s imposible to retrieve all pages where a post might appear, there are too many and there could be plugins involved. it’s way easier to simply remove all the cached pages.

Scot Hacker

OK, so can you add an option to invalidate all pages when a post is created or updated? Yes I can do this modification myself but I’d think this is something a lot of people would want…

Scot Hacker

So it should be as simple as:

add_action(”edit_post”,”obc_remove_files”);

at around line 345, right? It doesn’t seem like the hook is even firing when posts are updated. Am I missing something obvious? Thanks.

Javier García

That should do the trick except obc_remove_files is a function that requires arguments, so it can’t be used directly as hook. You’d need to create first a function without arguments.

Scot Hacker

Looks like the only required argument is $dir but I’m not sure what to put there. Clue?

Javier García

The directory you want to remove, in this case OBC_PATH.

Scot Hacker

Many thanks for the pointers, but I’ve run out of time on this one - bossman wants me to re-install WP-SuperCache :( Thanks anyway.

Renee

Thank you for a nice plugin. For me it actually works - even thoug I have chosen a cheap host-solution, where “safe mode” is always on..

This works for me anyway.
Thank you.

Oxydo

Gracias por tu plug-in caché. He probado otros y el tuyo es el único que me va.

Sería ideal que autoborrase los archivos expirados, pero bueno, ta bien.

Saludos. ;-)

Leave a comment

Your name
Your email

Get the updates

Subscribe to any of these feeds:

Become a sponsor

Increase your link popularity and improve your search engine rankings by placing your link in the literally thousands of websites using any of my scripts or themes.

Contact me asking for details.

Any question or comment?

Leave a comment on the weblog or contact me if it's a private matter.