本文整理汇总了PHP中FW_Cache::not_found_value方法的典型用法代码示例。如果您正苦于以下问题:PHP FW_Cache::not_found_value方法的具体用法?PHP FW_Cache::not_found_value怎么用?PHP FW_Cache::not_found_value使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FW_Cache
的用法示例。
在下文中一共展示了FW_Cache::not_found_value方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _init
/**
* @internal
*/
public static function _init()
{
self::$not_found_value = new FW_Cache_Not_Found_Exception();
/**
* Listen often triggered hooks to clear the memory
* instead of tick function https://github.com/ThemeFuse/Unyson/issues/1197
* @since 2.4.17
*/
foreach (array('query' => true, 'plugins_loaded' => true, 'wp_get_object_terms' => true, 'created_term' => true, 'wp_upgrade' => true, 'added_option' => true, 'updated_option' => true, 'deleted_option' => true, 'wp_after_admin_bar_render' => true, 'http_response' => true, 'oembed_result' => true, 'customize_post_value_set' => true, 'customize_save_after' => true, 'customize_render_panel' => true, 'customize_render_control' => true, 'customize_render_section' => true, 'role_has_cap' => true, 'user_has_cap' => true, 'theme_page_templates' => true, 'pre_get_users' => true, 'request' => true, 'send_headers' => true, 'updated_usermeta' => true, 'added_usermeta' => true, 'image_memory_limit' => true, 'upload_dir' => true, 'wp_head' => true, 'wp_footer' => true, 'wp' => true, 'wp_init' => true, 'fw_init' => true, 'init' => true, 'updated_postmeta' => true, 'deleted_postmeta' => true, 'setted_transient' => true, 'registered_post_type' => true, 'wp_count_posts' => true, 'wp_count_attachments' => true, 'after_delete_post' => true, 'post_updated' => true, 'wp_insert_post' => true, 'deleted_post' => true, 'clean_post_cache' => true, 'wp_restore_post_revision' => true, 'wp_delete_post_revision' => true, 'get_term' => true, 'edited_term_taxonomies' => true, 'deleted_term_taxonomy' => true, 'edited_terms' => true, 'created_term' => true, 'clean_term_cache' => true, 'edited_term_taxonomy' => true, 'switch_theme' => true, 'wp_get_update_data' => true, 'clean_user_cache' => true, 'process_text_diff_html' => true) as $hook => $tmp) {
add_filter($hook, array(__CLASS__, 'free_memory'), 1);
}
/**
* Flush the cache when something major is changed (files or db values)
*/
foreach (array('switch_blog' => true, 'upgrader_post_install' => true, 'upgrader_process_complete' => true, 'switch_theme' => true) as $hook => $tmp) {
add_filter($hook, array(__CLASS__, 'clear'), 1);
}
}
示例2: _init
/**
* @internal
*/
public static function _init()
{
self::$not_found_value = new FW_Cache_Not_Found_Exception();
}
示例3: _init
/**
* @internal
*/
public static function _init()
{
self::$is_enabled = function_exists('register_tick_function');
self::$not_found_value = new FW_Cache_Not_Found_Exception();
}