DoneJS StealJS jQuery ++ FuncUnit DocumentJS
3.0.0
2.3.27

 

  • Github
  • Twitter
  • Chat
  • Forum
  • Guides
  • Core
    • can-component
    • can-compute
    • can-connect
      • behaviors
        • ./base/
        • ./cache-requests/
        • ./can/map/
        • ./can/ref/
        • ./constructor/callbacks-once/
        • ./constructor/
        • ./constructor/store/
        • ./data/callbacks/
        • ./data/callbacks-cache/
        • ./data/combine-requests/
        • ./data/localstorage-cache/
        • ./data/memory-cache/
        • ./data/parse/
        • ./data/url/
        • ./data/worker/
        • ./fall-through-cache/
          • hydrators
            • hydrateInstance
            • hydrateList
          • data callbacks
            • getData
            • getListData
        • ./real-time/
      • modules
        • ./can/base-map/
        • ./can/model/
        • ./can/super-map/
        • ./can/tag/
        • ./helpers/weak-reference-map
      • data types
        • DataInterface
        • Instance
        • InstanceInterface
        • List
        • ListData
    • can-define
    • can-define/list/list
    • can-define/map/map
    • can-route
    • can-route-pushstate
    • can-set
    • can-stache
    • can-stache/helpers/route
    • can-stache-bindings
  • Ecosystem
  • Infrastructure
  • Legacy
  • Bitovi
    • Bitovi.com
    • Blog
    • Consulting
    • Training
    • Open Source
  • Chat
  • Forum
  • Star
  • Follow @canjs
  • CanJS
  • /
  • Core
  • /
  • can-connect
  • /
  • ./fall-through-cache/
  • /
  • getListData
  • / On this page
    • getListData

      function

      Get raw data from the cache if available, and then update the list later with data from the base connection.

      • source

      connection.getListData(set)

      Checks the cacheConnection for set's data.

      If the cache connection has data, the cached data is returned. Prior to returning the data, the hydrateList method is intercepted so we can get a handle on the list that's being created for the returned data. Once the intercepted list is retrieved, we use the base connection to get data and update the intercepted list and the cacheConnection.

      If the cache connection does not have data, the base connection is used to load the data and the cached connection is updated with that data.

      Parameters

      1. set {Set}:

        The set to load.

      Returns

      {Promise<ListData>}:

      A promise that returns the raw data.

      CanJS is part of DoneJS. Created and maintained by the core DoneJS team and Bitovi. Currently 3.0.0.