{"id":410902,"date":"2026-11-26T17:52:52","date_gmt":"2026-11-26T17:52:52","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/page-view-counting-low-cpu-usage\/"},"modified":"2026-11-26T17:52:34","modified_gmt":"2026-11-26T17:52:34","slug":"pearlview-counter","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/pearlview-counter\/","author":8019925,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.3.0","stable_tag":"1.3.0","tested":"7.1.5","requires":"6.5","requires_php":"7.4","requires_plugins":null,"header_name":"PearlView Counter","header_author":"Prashant Gorule","header_description":"Counts post views in Redis and writes them to the database only during the hours you choose. Shows the total at the end of the post.","last_updated":"2026-11-26 17:52:34","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":0,"downloads":20,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.3.0":{"tag":"1.3.0","author":"prashant32","date":"2026-11-26 17:52:34","revision":3827850}},"upgrade_notice":[],"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.3.0"],"block_files":[],"assets_screenshots":[],"screenshots":[]},"plugin_section":[],"plugin_tags":[],"plugin_category":[],"plugin_contributors":[295736],"plugin_business_model":[],"class_list":["post-410902","plugin","type-plugin","status-publish","hentry","plugin_contributors-prashant32","plugin_committers-prashant32"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/pearlview-counter.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>A visit does not update the database. The page prints the current total and, after it has loaded, a tiny request adds one to a Redis counter. A scheduled check later copies those counters into post meta, and only while the clock is inside a window you set.<\/p>\n\n<p>Default windows, India time (Asia\/Kolkata):<\/p>\n\n<ul>\n<li>3:00 AM to 12:00 PM<\/li>\n<li>3:00 PM to 6:00 PM<\/li>\n<\/ul>\n\n<p>Change the time zone, the hours, and how often the check runs under Settings \u2192 PearlView Counter.<\/p>\n\n<p>The total shown at the end of a post is the database value plus anything still waiting in Redis.<\/p>\n\n<p>Requires a persistent object cache. Redis, via the Redis Object Cache plugin, is the expected setup.<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin zip in Plugins \u2192 Add New \u2192 Upload Plugin, then activate it.<\/li>\n<li>Install and enable Redis Object Cache so <code>wp-content\/object-cache.php<\/code> is active.<\/li>\n<li>Open Settings \u2192 PearlView Counter and confirm the hours.<\/li>\n<li><p>On a VPS, run real cron every 15 minutes so the 3:00 AM window still fires when the site has no visitors:<\/p>\n\n<p>define( 'DISABLE_WP_CRON', true );<\/p>\n\n<p>*\/15 * * * * curl -s https:\/\/example.com\/wp-cron.php?doing_wp_cron &gt;\/dev\/null 2&gt;&amp;1<\/p><\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"will%20a%20page%20view%20write%20to%20mysql%3F\"><h3>Will a page view write to MySQL?<\/h3><\/dt>\n<dd><p>No. The view increments Redis. MySQL is updated only inside your write hours, or when an administrator uses \u201cWrite to the database now\u201d.<\/p><\/dd>\n<dt id=\"what%20if%20redis%20restarts%20before%20a%20window%3F\"><h3>What if Redis restarts before a window?<\/h3><\/dt>\n<dd><p>Pending counts that have not been written yet are lost. Totals already stored in post meta stay.<\/p><\/dd>\n<dt id=\"does%20uninstall%20delete%20the%20counts%3F\"><h3>Does uninstall delete the counts?<\/h3><\/dt>\n<dd><p>No. Settings are removed. The <code>_pearlview_views<\/code> post meta is left in place.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>First release. Redis counting, scheduled database writes, and a settings screen for the write hours.<\/li>\n<\/ul>","raw_excerpt":"Counts post views in Redis and writes them to MySQL only during the hours you choose.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/410902","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=410902"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/prashant32"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=410902"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=410902"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=410902"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=410902"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=410902"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=410902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}