aboutsummaryrefslogtreecommitdiff
path: root/model
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--model/Schedule.php6
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;