{"id":6851,"date":"2009-09-29T22:30:03","date_gmt":"2009-09-29T22:30:03","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wpdb-cache-money\/"},"modified":"2011-11-18T17:34:40","modified_gmt":"2011-11-18T17:34:40","slug":"wpdb-cache-money","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/wpdb-cache-money\/","author":4178674,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"0.35","stable_tag":"trunk","tested":"3.2.1","requires":"3.0","requires_php":"","requires_plugins":"","header_name":"WPDB Cache Money","header_author":"Eric Eaglstun","header_description":"","assets_banners_color":"","last_updated":"2011-11-18 17:34:40","external_support_url":"","external_repository_url":"","donate_link":"http:\/\/www.heifer.org\/","header_plugin_uri":"http:\/\/findsubstance.com","header_author_uri":"http:\/\/ericeaglstun.com","rating":0,"author_block_rating":0,"active_installs":0,"downloads":4075,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":"1444715","resolution":"1","location":"plugin","width":530,"height":351}},"screenshots":{"1":"I gots to get paid, son <code>\/trunk\/screenshot-1.png<\/code> \nphoto by Andrew Magill http:\/\/www.flickr.com\/photos\/amagill\/362201147\/"}},"plugin_section":[],"plugin_tags":[72069,146,1783,153,10609,3604],"plugin_category":[45,52,59],"plugin_contributors":[],"plugin_business_model":[],"class_list":["post-6851","plugin","type-plugin","status-publish","hentry","plugin_tags-bling","plugin_tags-cache","plugin_tags-cash","plugin_tags-database","plugin_tags-db","plugin_tags-money","plugin_category-ecommerce","plugin_category-performance","plugin_category-utilities-and-tools","plugin_committers-postpostmodern"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/wpdb-cache-money.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/wpdb-cache-money\/trunk\/screenshot-1.png?rev=1444715","caption":"I gots to get paid, son <code>\/trunk\/screenshot-1.png<\/code> \nphoto by Andrew Magill http:\/\/www.flickr.com\/photos\/amagill\/362201147\/"}],"raw_content":"<!--section=description-->\n<p>Cache Money stores all database result sets on the filesystem as serialized data, by using the oft-neglectged wp-content\/db.php to extend the normal $wpdb class.  Result sets will be updated as needed on a user by user basis when they do actions that perform update queries.<\/p>\n <p>Please note that this is not a full scale page cache, like WP-Cache or WP Super Cache, although this will work just fine in conjunction.  Cache Money is meant for sites with constantly changing content, where a full cache may not be suitable.<\/p>\n <p>Tested with Wordpress and Wordpress MU 2.8.0 ~ 3.1 \nRequires PHP 5, like all good PHP apps.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Place entire \/wpdb-cache-money\/ directory to the \/wp-content\/plugins\/ directory<\/li>\n<li>Activate the plugin through the 'Plugins' menu in WordPress<\/li>\n<li>Bling<\/li>\n<\/ol>\n\n<!--section=faq-->\n<h4>This doesn't do anything!<\/h4>\n <p>Yes it does.  Hey, didn't you ask this question over on my other plugin too?<\/p>\n <h4>I need the cache to be cleared at a different interval than 5 minutes.<\/h4>\n <p>Change <code>$cacheMoney-&gt;threshold<\/code> to whatever number of seconds you wish.<\/p>\n <h4>How can I tell if this is working?<\/h4>\n <p>The directory wp-content\/plugins\/wpdb-cache-money\/ should be full of files with names similar to <code>4a13fc6a615ac14cc3f58160ce9c52f3.php<\/code>.  If not, check to make sure this directory is writable by your server. <code>echo $wpdb-&gt;stats(TRUE)<\/code> will give you a result like <code>q: 9 | c: 6 | m: 9.055 t: 0.171<\/code>. <code>q<\/code> is the number of actual database queries, <code>c<\/code> is the number of cached queries, <code>m<\/code> is the memory usage in megabytes, and <code>t<\/code> is the time in seconds to render the page. <code>echo $wpdb-&gt;stats()<\/code> will do the same, wrapped in an html comment, for times when you need to be discrete. There is also a profiler method - <code>echo $wpdb-&gt;profiler()<\/code>.  You will need to make sure <code>$cacheMoney-&gt;useProfiler<\/code> is set to <code>TRUE<\/code> to use this.  The default for the profiler is to sort the queries by length of time descending. <code>$wpdb-&gt;profiler(FALSE)<\/code> will show the queries in the order performed.<\/p>\n\n<!--section=changelog-->\n<h4>.5<\/h4>\n <ul>\n<li>Admin settings area added, major code cleanup, bumped min WP version to 3.0 *<\/li>\n<\/ul>\n <h4>0.35<\/h4>\n <ul>\n<li>Minor code cleanup *<\/li>\n<\/ul>\n <h4>0.31<\/h4>\n <ul>\n<li>Important security fix *<\/li>\n<\/ul>\n <h4>0.22<\/h4>\n <ul>\n<li>Not caching options queries using autoload, was screwing up wp cron<\/li>\n<\/ul>\n <h4>0.21<\/h4>\n <ul>\n<li>Added second parameter to wp-&gt;query(), to bypass reset of internal timer on inserts<\/li>\n<\/ul>\n <h4>0.176<\/h4>\n <ul>\n<li>Using HEREDOC syntax for serialized data<\/li>\n<\/ul>\n <h4>0.175<\/h4>\n <ul>\n<li>Improved caching with FOUND_ROWS() queries<\/li>\n<\/ul>\n <h4>0.171<\/h4>\n <ul>\n<li>Fixed bug in escaped single quotes in serialized data.<\/li>\n<\/ul>\n <h4>0.166<\/h4>\n <ul>\n<li>Allows a salt, used in the md5 generation of file names.<\/li>\n<\/ul>\n <h4>0.165<\/h4>\n <ul>\n<li>Allows logged in administrators to clear all cache info with the variable ?cache-clear in query string<\/li>\n<\/ul>\n <h4>0.16<\/h4>\n <ul>\n<li>Allows logged in administrators to view cache info with the variable ?cache-profile in query string, set to 'sort' to sort by length<\/li>\n<\/ul>\n <h4>0.15<\/h4>\n <ul>\n<li>clearCache() method to empty cache files.  Called automatically on plugin deactivation.<\/li>\n<\/ul>\n <h4>0.14<\/h4>\n <ul>\n<li>Improved styles in profiler().<\/li>\n<\/ul>\n <h4>0.13<\/h4>\n <ul>\n<li>First pass at query browser.  This is not active - if this proves to be a bad idea, will be removed from later versions.<\/li>\n<\/ul>\n <h4>0.1<\/h4>\n <ul>\n<li>Refined profiler() methods.<\/li>\n<\/ul>\n <h4>0.09<\/h4>\n <ul>\n<li>Bug fixes. First pass at documentation, profiler() methods.<\/li>\n<\/ul>\n <h4>0.02<\/h4>\n <ul>\n<li>Initial public release. No documentation.<\/li>\n<\/ul>","raw_excerpt":"Database result serialization.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/6851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=6851"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/postpostmodern"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=6851"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=6851"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=6851"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=6851"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=6851"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=6851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}