In the following code, the GFCache::get doesn’t seem to hold its value for longer than a second:
public static function get_entry_count_per_form() {
if ( version_compare( self::get_database_version(), '2.3-dev-1', '<' ) ) {
return GF_Forms_Model_Legacy::get_entry_count_per_form();
}
global $wpdb;
$entry_table_name = self::get_entry_table_name();
$entry_count = GFCache::get( 'get_entry_count_per_form' );
if ( empty( $entry_count ) ) {
//Getting entry count per form
$sql = "SELECT form_id, count(id) as entry_count FROM $entry_table_name l WHERE status='active' GROUP BY form_id";
$entry_count = $wpdb->get_results( $sql );
GFCache::set( 'get_entry_count_per_form', $entry_count, true, 30 );
}
return $entry_count;
}
On the
$entry_count = GFCache::get( 'get_entry_count_per_form' );
Line.
I also found there’s an error in common.php
public function flush( $flush_persistent = false ) {
return GFCache::flush( $flus_persistent );
}
I’m wondering if that has something to do with it?