Skip to content

Commit

Permalink
Let's see if this works on Heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
mk12 committed Sep 8, 2015
1 parent c751c3b commit c6864fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func (s *System) cacheRender(depth int) [][]vector {
return s.render(depth)
}

filename := fmt.Sprintf("cache/%s-%d.gob", name, depth)
filename := fmt.Sprintf("/app/cache/%s-%d.gob", name, depth)
_, err := os.Stat(filename)
if err == nil {
log.Println("Cache hit:", filename)
Expand All @@ -56,7 +56,7 @@ func (s *System) cacheRender(depth int) [][]vector {
if os.IsNotExist(err) {
log.Println("Cache miss:", filename)
segments := s.render(depth)
file, err := os.Create(filename)
file, err := os.OpenFile(filename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600)
if err != nil {
log.Println("File create error:", err)
return segments
Expand Down

0 comments on commit c6864fe

Please sign in to comment.