1 | <?php |
||
10 | class CacheableObserver |
||
11 | { |
||
12 | /** |
||
13 | * Tell the cacheable service to flush all cache |
||
14 | * that related to the given model. |
||
15 | * |
||
16 | * @param \Suitmedia\Cacheable\Contracts\CacheableModel $model |
||
17 | * |
||
18 | * @return void |
||
19 | */ |
||
20 | protected function flushCache(CacheableModel $model) |
||
30 | |||
31 | /** |
||
32 | * Saved event handler. |
||
33 | * |
||
34 | * @param \Suitmedia\Cacheable\Contracts\CacheableModel $model |
||
35 | * |
||
36 | * @return void |
||
37 | */ |
||
38 | public function saved(CacheableModel $model) |
||
42 | |||
43 | /** |
||
44 | * Deleted event handler. |
||
45 | * |
||
46 | * @param \Suitmedia\Cacheable\Contracts\CacheableModel $model |
||
47 | * |
||
48 | * @return void |
||
49 | */ |
||
50 | public function deleted(CacheableModel $model) |
||
54 | |||
55 | /** |
||
56 | * Restored event handler. |
||
57 | * |
||
58 | * @param \Suitmedia\Cacheable\Contracts\CacheableModel $model |
||
59 | * |
||
60 | * @return void |
||
61 | */ |
||
62 | public function restored(CacheableModel $model) |
||
66 | } |
||
67 |