Added home page cache forgets upon CUD
Added home page cache forgets upon CUD
This commit is contained in:
parent
07b8cd14c1
commit
413aac5d2f
|
@ -7,6 +7,7 @@ use App\Models\Labels;
|
|||
use App\Models\Pricing;
|
||||
use App\Models\Providers;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
|
@ -92,6 +93,10 @@ class DomainsController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('domains.index')
|
||||
->with('success', 'Domain Created Successfully.');
|
||||
}
|
||||
|
@ -158,6 +163,10 @@ class DomainsController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('domains.index')
|
||||
->with('success', 'Domain Updated Successfully.');
|
||||
}
|
||||
|
@ -173,6 +182,10 @@ class DomainsController extends Controller
|
|||
|
||||
Labels::deleteLabelsAssignedTo($domain->id);
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('domains.index')
|
||||
->with('success', 'Domain was deleted Successfully.');
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ namespace App\Http\Controllers;
|
|||
use App\Models\Misc;
|
||||
use App\Models\Pricing;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
|
@ -66,6 +67,10 @@ class MiscController extends Controller
|
|||
'next_due_date' => $request->next_due_date,
|
||||
]);
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('misc.index')
|
||||
->with('success', 'Misc service created Successfully.');
|
||||
}
|
||||
|
@ -111,6 +116,10 @@ class MiscController extends Controller
|
|||
'active' => (isset($request->is_active)) ? 1 : 0
|
||||
]);
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('misc.index')
|
||||
->with('success', 'Misc service updated Successfully.');
|
||||
}
|
||||
|
@ -124,6 +133,10 @@ class MiscController extends Controller
|
|||
$p = new Pricing();
|
||||
$p->deletePricing($misc->id);
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('misc.index')
|
||||
->with('success', 'Misc service was deleted Successfully.');
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ use App\Models\Pricing;
|
|||
use App\Models\Providers;
|
||||
use App\Models\Reseller;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
|
@ -108,6 +109,10 @@ class ResellerController extends Controller
|
|||
);
|
||||
}
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('reseller.index')
|
||||
->with('success', 'Reseller hosting created Successfully.');
|
||||
}
|
||||
|
@ -221,6 +226,10 @@ class ResellerController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('reseller.index')
|
||||
->with('success', 'Reseller hosting updated Successfully.');
|
||||
}
|
||||
|
@ -239,6 +248,10 @@ class ResellerController extends Controller
|
|||
|
||||
IPs::deleteIPsAssignedTo($id);
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('reseller.index')
|
||||
->with('success', 'Reseller hosting was deleted Successfully.');
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ use App\Models\Providers;
|
|||
use App\Models\Locations;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use Illuminate\Support\Str;
|
||||
|
@ -161,6 +162,10 @@ class ServerController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('servers.index')
|
||||
->with('success', 'Server Created Successfully.');
|
||||
}
|
||||
|
@ -296,6 +301,10 @@ class ServerController extends Controller
|
|||
}
|
||||
}
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('servers.index')
|
||||
->with('success', 'Server Updated Successfully.');
|
||||
}
|
||||
|
@ -313,6 +322,10 @@ class ServerController extends Controller
|
|||
|
||||
IPs::deleteIPsAssignedTo($server->id);
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('servers.index')
|
||||
->with('success', 'Server was deleted Successfully.');
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
|||
|
||||
use App\Models\Settings;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
|
||||
|
@ -53,6 +54,8 @@ class SettingsController extends Controller
|
|||
Session::put('show_server_value_location', $request->show_server_value_location);
|
||||
Session::save();
|
||||
|
||||
Cache::forget('settings');//Main page settings cache
|
||||
|
||||
return redirect()->route('settings.index')
|
||||
->with('success', 'Settings Updated Successfully.');
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ use App\Models\Pricing;
|
|||
use App\Models\Providers;
|
||||
use App\Models\Shared;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
|
@ -113,6 +114,10 @@ class SharedController extends Controller
|
|||
);
|
||||
}
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('shared.index')
|
||||
->with('success', 'Shared hosting created Successfully.');
|
||||
}
|
||||
|
@ -239,6 +244,10 @@ class SharedController extends Controller
|
|||
]);
|
||||
}
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('shared.index')
|
||||
->with('success', 'Shared hosting updated Successfully.');
|
||||
}
|
||||
|
@ -257,6 +266,10 @@ class SharedController extends Controller
|
|||
|
||||
IPs::deleteIPsAssignedTo($shared->id);
|
||||
|
||||
Cache::forget('services_count');//Main page services_count cache
|
||||
Cache::forget('due_soon');//Main page due_soon cache
|
||||
Cache::forget('recently_added');//Main page recently_added cache
|
||||
|
||||
return redirect()->route('shared.index')
|
||||
->with('success', 'Shared hosting was deleted Successfully.');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user