本文整理匯總了PHP中js_reset_all_caches函數的典型用法代碼示例。如果您正苦於以下問題:PHP js_reset_all_caches函數的具體用法?PHP js_reset_all_caches怎麽用?PHP js_reset_all_caches使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了js_reset_all_caches函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: purge_all_caches
/**
* Invalidates browser caches and cached data in temp
* @return void
*/
function purge_all_caches()
{
global $CFG;
reset_text_filters_cache();
js_reset_all_caches();
theme_reset_all_caches();
get_string_manager()->reset_caches();
// purge all other caches: rss, simplepie, etc.
remove_dir($CFG->dataroot . '/cache', true);
// make sure cache dir is writable, throws exception if not
make_upload_directory('cache');
clearstatcache();
}
示例2: purge_all_caches
/**
* Invalidates browser caches and cached data in temp.
*
* IMPORTANT - If you are adding anything here to do with the cache directory you should also have a look at
* {@link phpunit_util::reset_dataroot()}
*
* @return void
*/
function purge_all_caches()
{
global $CFG, $DB;
reset_text_filters_cache();
js_reset_all_caches();
theme_reset_all_caches();
get_string_manager()->reset_caches();
core_text::reset_caches();
if (class_exists('core_plugin_manager')) {
core_plugin_manager::reset_caches();
}
// Bump up cacherev field for all courses.
try {
increment_revision_number('course', 'cacherev', '');
} catch (moodle_exception $e) {
// Ignore exception since this function is also called before upgrade script when field course.cacherev does not exist yet.
}
$DB->reset_caches();
cache_helper::purge_all();
// Purge all other caches: rss, simplepie, etc.
clearstatcache();
remove_dir($CFG->cachedir . '', true);
// Make sure cache dir is writable, throws exception if not.
make_cache_directory('');
// This is the only place where we purge local caches, we are only adding files there.
// The $CFG->localcachedirpurged flag forces local directories to be purged on cluster nodes.
remove_dir($CFG->localcachedir, true);
set_config('localcachedirpurged', time());
make_localcache_directory('', true);
\core\task\manager::clear_static_caches();
}
示例3: purge_all_caches
/**
* Invalidates browser caches and cached data in temp
* @return void
*/
function purge_all_caches()
{
global $CFG;
reset_text_filters_cache();
js_reset_all_caches();
theme_reset_all_caches();
get_string_manager()->reset_caches();
textlib::reset_caches();
// purge all other caches: rss, simplepie, etc.
remove_dir($CFG->cachedir . '', true);
// make sure cache dir is writable, throws exception if not
make_cache_directory('');
// hack: this script may get called after the purifier was initialised,
// but we do not want to verify repeatedly this exists in each call
make_cache_directory('htmlpurifier');
}