Commit bcacca29 authored by Andrea Ruggiero's avatar Andrea Ruggiero
Browse files

Improve performance

parent e9a3a875
Pipeline #1566 failed with stage
in 0 seconds
......@@ -26,6 +26,7 @@ class EventRepository extends BaseRepository
if (!isset($this->cache[$event->event_id])) {
$this->cache[$event->event_id] = $this->db()->where('title', $event->title)->where('date', $event->date)->where('start', $event->start)->where('end', $event->end)->select('place_id', 'event_id')->get();
file_put_contents('cache.json', json_encode($this->cache));
$this->cache = json_decode(file_get_contents('cache.json'), true);
}
return $this->cache[$event->event_id];
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment