Turning off view caching by default now. Should help lower the memory footprint.

This commit is contained in:
Scott Erickson 2014-03-07 11:57:15 -08:00
parent d14f862359
commit 610fc0694b
2 changed files with 2 additions and 2 deletions

View file

@ -90,7 +90,7 @@ module.exports = class CocoRouter extends Backbone.Router
@cache[route].fromCache = true
return @cache[route]
view = @getView(route)
@cache[route] = view unless view and view.cache is false
@cache[route] = view if view?.cache
return view
routeDirectly: (path, args) ->

View file

@ -10,7 +10,7 @@ makeScopeName = -> "view-scope-#{classCount++}"
module.exports = class CocoView extends Backbone.View
startsLoading: false
cache: true # signals to the router to keep this view around
cache: false # signals to the router to keep this view around
template: -> ''
events: