WordPress
Майстер класи WordPress
DB Cache plugin
The fastest cache engine for WordPress, that produces cache of database queries with easy configuration.
Description
This plugin caches every database query with given lifetime. It is much faster than other html caching plugins and uses less disk space for caching.
I think you’ve heard of WP-Cache or WP Super Cache, they are both top plugins for WordPress, which make your site faster and responsive. Forget about them – with DB Cache your site will work much faster and will use less disk space for cached files. Your visitors will always get actual information in sidebars and server CPU loads will be as low as posible.
See the DB Cache homepage for further information.
Installation
1. You should upload the db-cache folder to your wp-content/plugins
2. Go to your Plugins page and activate “DB Cache”
3. Now go to Settings->DB Cache and enable caching of DB queries. The plugin will create wp-content/tmp folder and db.php file for serving cached queries in wp-content folder.
That’s all! Enjoy the speed of loading pages.
Frequently Asked Questions
How do I know my blog is being cached?
Check your cache directory wp-content/tmp/ for cache files.
How can I ensure of reducing server usage?
View the source of your site page, there maybe some code like this at the foot:
<!– 00 queries. 00 seconds. –>
If not, please put these codes in your footer template:
<!– <?php echo get_num_queries(); ?> queries. <?php timer_stop(1); ?> seconds. –>
After using the DB Cache, I think you’ll find the number of ‘queries’ reducing a lot.
Why is DB Cache better than WP Super Cache?
This plugin is based on a fundamentally different principle of caching queries to database instead of full pages, which optimizes WordPress from the very beginning and uses less disk space for cache files because it saves only useful information.
It saves information separately and also caches hidden requests to database.
Troubleshooting
Make sure wp-content is writeable by the web server. If not you’ll need to chmod wp-content folder for writing and also config.ini file in plugin folder.
How do I uninstall DB Cache?
1. Disable it at Settings->DB Cache page. The plugin will automatically delete all cache files.
2. Deactivate it at plugins page.
Other Notes
Updates
Updates to the plugin will be posted here and the Ukrainian WordPress will always link to the newest version.
Thanks
I would like to thank Lviv for giving me the idea for this and RKG for support.


[...] експерименти з кешуванням в WordPress готовим плагіном DB Cache, який на даний момент забезпечує найкращу [...]
hello there,
i sent you a message earlier today.
i installed the 0.1 version for testing purpose, and didnt felt that much speed.
nor the queries were decreased.
but i updated to 0.2 and i say WOWWWWWWWWWW, it got amazingly FAST Page loading. so completely deleted super cache.
but the amount of queries are still same, which doesn’t matter anyway.
Installation went fine.
The plugin is active.
Temp cache file are present.
But I see no reduction whatever in the number of queries or load time.
So?
Peace,
Gene
same here
[...] Per ulteriori info potete consultare la pagina ufficiale del plugin. [...]
How does this plugin handle dynamic content? I.e. if I have a counter on each post that shows the number of visitors/readers of that post, or I use a plugin like wp-postratings?
You can select tables to cache. For example caching only wp_options table will reduce a half of all queries
огромное спасибо, по сути то, что мне так нужно для моего ресурса)) только вот проблема – все пишщется, кеш создается, а снижения кол-ва кваери нет. и по времени тож самое, с кожалению. хостюсь на мастерхосте, надеюсь есть идеи как заставить все работать))
обновил до версии 0.3 – попробуйте, возможно проблема решится сама собой.
качайте пока здесь, на wordpress.org будет к вечеру
So the Gene’s problem is solved simply updating to version 0.3
absolutely.
works great for me – i still gotta lot of dynamic stuff and thanks to DB cache it’s possible now to leave required queries dynamic.
thank you very much! totally awesome job
огромное спасибо)
I only got this after activation:
Fatal error: Cannot redeclare class wpdb in /home/fruity/public_html/wp-content/db.php on line 53
Couldn’t login to WordPress. Deleting the plugin wouldn’t remove the error message or allow me to login to WordPress.
Then finally realized… I deleted dp.php and that ini file written to wp-content folder. Was able to login again to WordPress and deactivate plugin properly. Whew… scared me. (But that wasn’t in your “Troubleshooting instructions above”.)
[...] times and stress on your WordPress database. Today I compare it to a new caching plugin called DB Cache Plugin. It claims to be faster because it caches the php calls rather than the entire page. Do these [...]
Will this work with WPMU?
It is not working with WPMU, but I’ll do it in the future
Ok! Good to hear and thanks for the fast response! Any idea what “future” means in your schedule?
У меня вообще не грузится сайт и нет входа в админку.
/wp-content/db.php on line 53
Cannot redeclare class wpdb
Что делать? Помогите!
[...] DB Cache [...]
Tried this on my test blog. I found that the number of queries reduced from 35 to 4, but the page generation time did not change at all.
I thought that WordPress already caches database queries, how is your plugin different?
Also should the cache function be enabled in the WP Config file?
One more thing: in my case there has been a slight improvement in rendering times, in addition to the major reduction in queries. So there’s at least some benefit.
Peace,
Gene
Interesting. How does this plugin play with other plugins that depend on fresh data such as Bad Behaviour?
It is breaking Lester Chan’s pagenavi plugin.
any ideas for a workaround?
[...] DB Cache [...]
At the moment working on support of PageNavi, DB Manager plugins. Also some problems appear with “Cannot redeclare class” – checking it.
People say that it support Bad Behavior, but I didn’t checked it.
No changes of wp-config file etc. needed – just as in instruction.
Once activated, and once the home page has been cached, it removes the link to go to page 2 of your blog (ex. “previous page”).
i use db cache with GZippy, which gzip content too. make the site VERY Fast.
but i have few suggestions for the future version.
if posts are updated the cache of that post should be refreshed, as well as if comments are posted.
make that an option.
Ok, I-MAN, it will be.
At the moment I disabled caching of wp_posts and wp_comments on my sites.
WordPress does much connections to wp_options and terms tables
[...] Check out, and report your experience. [...]