Skip to content

Commit 2931c74

Browse files
jpscharfroshangautam
authored andcommitted
[refactor] bust cache on import
- bust task cache before importing exported tasks
1 parent 7ed0347 commit 2931c74

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Repositories/EloquentTaskRepository.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,13 @@ public function execute($id)
212212
*/
213213
public function import($input)
214214
{
215+
Cache::forget('totem.tasks.all');
216+
Cache::forget('totem.tasks.active');
217+
215218
collect(json_decode(array_get($input, 'content')))
216219
->each(function ($data) {
220+
Cache::forget('totem.task.'.$data->id);
221+
217222
$task = $this->find($data->id);
218223

219224
if (is_null($task)) {

0 commit comments

Comments
 (0)