Title: Record count incorrect
Last modified: March 14, 2023

---

# Record count incorrect

 *  Resolved [crldev](https://wordpress.org/support/users/crldev/)
 * (@crldev)
 * [3 years ago](https://wordpress.org/support/topic/record-count-incorrect/)
 * Hi there,
 * If I search from within the PDb dashboard, the system returns the correct number
   of records, but the statement, “xx records found, sorted by: Surname.” does not
   update. So, as a simple example, I might do a first search for all surnames that
   contain “z”. It returns 18 records correctly and states that it has returned 
   18 records. If I then change the search to surnames that contain “w”, it will
   list the 30 records, but still state, “18 records found, sorted by: Surname.”.
   Hitting “Clear” or refreshing the page makes no difference. Do you have any thoughts
   on how I can solve this as the record count is very useful.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [xnau webdesign](https://wordpress.org/support/users/xnau/)
 * (@xnau)
 * [3 years ago](https://wordpress.org/support/topic/record-count-incorrect/#post-16559477)
 * I see there is an issue in the code that comes up when a “persistent” cache is
   used. This type of cache can either be a plugin or something provided by your
   hosting server.
 * The specific problem is no cache expiration time was specified in the code, so
   when the persistent cache is active, it holds on to the value instead of letting
   it change.
 * I will fix this in the next update, but you can address it yourself by making
   a small change to the code.
 * In the plugin file classes/PDb_admin_list/query.php on line 84, you’ll see:
 *     ```wp-block-code
       wp_cache_add( $cachekey, $count );
       ```
   
 * Change this to:
 *     ```wp-block-code
       wp_cache_add( $cachekey, $count, Participants_Db::cache_expire() );
       ```
   
 * And the cache will only hold on to the value briefly.
 *  Thread Starter [crldev](https://wordpress.org/support/users/crldev/)
 * (@crldev)
 * [3 years ago](https://wordpress.org/support/topic/record-count-incorrect/#post-16559510)
 * I never fail to be impressed by the speed and quality of response.
 * The issue arose after I switched to a new service provider – WPEngine. Before
   you responded, I asked them to exclude the particular page from their caching.
   They did this immediately and it solved the problem.
 * I look forward to the fix being released.
 * Thanks again for such a great plugin and support.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Record count incorrect’ is closed to new replies.

 * ![](https://ps.w.org/participants-database/assets/icon-256x256.jpg?rev=1389807)
 * [Participants Database](https://wordpress.org/plugins/participants-database/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/participants-database/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/participants-database/)
 * [Active Topics](https://wordpress.org/support/plugin/participants-database/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/participants-database/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/participants-database/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [crldev](https://wordpress.org/support/users/crldev/)
 * Last activity: [3 years ago](https://wordpress.org/support/topic/record-count-incorrect/#post-16559510)
 * Status: resolved