本文整理汇总了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;
}