     return unless @isRunning()
     @_currenciesRestClient.getAllCurrencies (currencies) =>
       @_cache.set(currencies) if currencies?
-      #5 minutes * 60 seconds * 1000 milliseconds = 600000ms
+      #5 minutes * 60 seconds * 1000 milliseconds = 300000ms
       setTimeout((() => @updateTicker()), 300000) if scheduleNext
       @emit 'updated', @_cache.get() if currencies?
-      #l @_cache.get()
 
-  getCache: () ->
-    @_cache.get()
+  getCache: -> @_cache.get()
 
   getCacheAsync: (callback=undefined) ->
     if @_cache.isCacheEmpty()


  _cache: {}
  _chromeStore: new ledger.storage.ChromeStore('ticker')
  #chromeStore.get 'ticker_cache', (r) =>
  # _cache = r.ticker_cache?

  get: () ->
    return @_cache

  set: (currencies) ->
    @_cache = currencies
    @_chromeStore.set {ticker_cache: currencies}

  isCacheEmpty: () ->
    _.isEmpty(@_cache)


###

###
class ledger.tasks.TickerTask extends ledger.tasks.Task

  constructor: ->
    super('tickerTaskID')
    @_currenciesRestClient = new ledger.api.CurrenciesRestClient
    @_cache = new CurrencyCache
