clear cache swr code example

Example 1: laravel artisan clear cache

//Updated Dec 2020
//laravel artisan clear cache 
php artisan view:clear 
php artisan cache:clear
php artisan route:clear
php artisan config:clear

Example 2: cordova delete cache

// download this plugin. it reset cache on internal browser
cordova plugin add cordova-plugin-cache-clear

// use this function in index.js or on main html
document.addEventListener('deviceready', function() {
    var success = function(status) {
        alert('Message: ' + status);
    };
    var error = function(status) {
        alert('Error: ' + status);
    };
    window.CacheClear(success, error);
});

Tags:

Php Example