diff options
author | Lukas Schauer | 2020-12-28 19:24:18 +0100 |
---|---|---|
committer | Lukas Schauer | 2020-12-28 19:24:18 +0100 |
commit | ecc622911eaba0b6c93c2a3964a49af9d208283e (patch) | |
tree | f94568d917043250548039d8cec4b251079c500c | |
parent | a39f10de70532cc686263f6fa9ee3efa2f39f7d6 (diff) |
Perfected prefambulation levels reached
Diffstat (limited to '')
-rw-r--r-- | model/Schedule.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/model/Schedule.php b/model/Schedule.php index 5419136..e182132 100644 --- a/model/Schedule.php +++ b/model/Schedule.php @@ -72,7 +72,8 @@ class Schedule public function getSchedule() { - $cachefile = sprintf('/tmp/getschedule-cache-%s.cache', $this->getConference()->getSlug()); + $cachefile = sprintf('/dev/shm/getschedule-cache-%s.cache', $this->getConference()->getSlug()); + $tmpcachefile = sprintf('/dev/shm/getschedule-cache-%s.cache.new', $this->getConference()->getSlug()); if(file_exists($cachefile) && !$GLOBALS['regenschedcache']) { return unserialize(file_get_contents($cachefile)); } @@ -267,7 +268,8 @@ class Schedule } if($GLOBALS['regenschedcache']) { - file_put_contents($cachefile, serialize($program)); + file_put_contents($tmpcachefile, serialize($program)); + rename($tmpcachefile, $cachefile); } return $program; |