本文整理匯總了PHP中GFCache::delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP GFCache::delete方法的具體用法?PHP GFCache::delete怎麽用?PHP GFCache::delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類GFCache
的用法示例。
在下文中一共展示了GFCache::delete方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: refresh_lead_field_value
public static function refresh_lead_field_value($lead_id, $field_id)
{
$cache_key = 'GFFormsModel::get_lead_field_value_' . $lead_id . '_' . $field_id;
GFCache::delete($cache_key);
}
示例2: clear_field_value_cache
public static function clear_field_value_cache($form)
{
if (!class_exists('GFCache')) {
return;
}
foreach ($form['fields'] as &$field) {
if (GFFormsModel::get_input_type($field) == 'total') {
GFCache::delete('GFFormsModel::get_lead_field_value__' . $field['id']);
}
}
}
示例3: maybe_continue_cache_rebuild
/**
* Called only by the wp_cron job.
*
* @param array $data
* @param int $form_id The form ID.
*/
public function maybe_continue_cache_rebuild($data, $form_id)
{
if (rgar($data, 'incomplete')) {
GFCache::set('gpoll_data_tmp_' . $form_id, $data, true);
} else {
GFCache::set('gpoll_data_' . $form_id, $data, true);
GFCache::delete('gpoll_data_tmp_' . $form_id);
}
}
示例4: delete_lock_meta
protected function delete_lock_meta($object_id)
{
GFCache::delete(self::PREFIX_EDIT_LOCK . $this->_object_type . '_' . $object_id);
return true;
}
示例5: get_posted_settings
/**
* Ensure the group setting keys are not lost when the settings are saved. Clear the cached settings if no feeds exist so the new format keys will be used.
*
* @return array The post data containing the updated settings.
*/
public function get_posted_settings()
{
$post_data = parent::get_posted_settings();
if ($this->is_plugin_settings($this->_slug) && $this->is_save_postback() && !empty($post_data)) {
$feed_count = $this->count_feeds();
if ($feed_count > 0) {
$settings = $this->get_previous_settings();
$settings['apiKey'] = rgar($post_data, 'apiKey');
return $settings;
} else {
GFCache::delete('mailchimp_plugin_settings');
}
}
return $post_data;
}