1 <?php
2
3 4 5 6 7 8 9 10
11
12 namespace Icybee\Modules\Cache;
13
14 use ICanBoogie\HTTP\Request;
15 use ICanBoogie\Operation;
16
17 class Hooks
18 {
19 20 21
22 static public function clear_modules_cache()
23 {
24 Request::from(Operation::encode('cache/core.modules/clear'))->post();
25 Request::from(Operation::encode('cache/core.configs/clear'))->post();
26 Request::from(Operation::encode('cache/core.catalogs/clear'))->post();
27 }
28
29 30 31 32 33
34 static public function on_modules_change(Operation\ProcessEvent $event)
35 {
36 self::clear_modules_cache();
37 }
38 }