Skip to Content

emptyCaches()

Empties all JavaScript caches available in the window.

JavaScript February 8, 2021

Usage

JavaScript
nebula.emptyCaches()

Parameters

This function does not accept any parameters. Is this incorrect?

Source File

Located in /assets/js/modules/optimization.js on line 265.

No Hooks

This function does not have any filters or actions available. Request one?
JavaScript
nebula.emptyCaches = function(){
    if ( 'caches' in window ){
        caches.keys().then(function(names){
            for ( let name of names ){
                caches.delete(names[i]);
            }
        });
    }
};

Override

To override or disable this JavaScript function, simply redeclare it with the exact same function name.

JavaScript
nebula.emptyCaches = function(){
    //Write your own code here, leave it blank, or return false.
}