Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-581

Refresh option should invalidate caches instead purging it

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.4.4
    • Fix Version/s: 1.5
    • Component/s: Caching
    • Labels:
    • Affected Branches:
      MOODLE_14_STABLE
    • Fixed Branches:
      MOODLE_15_STABLE

      Description

      The refresh option should invalidate the caches (so next time a WebService is invoked data from cache is not retrieved).

      Deleting the cache is a bad idea because if the device comes to "offline" mode we've lost all the cached information

      This require changes in WebServices for indicating WebServices that are going to store information in cache but, when the device is connected, they must retrieve always information not cached. Instead using a flag called "cache", we need two different ones "saveToCache" and "getFromCache" so we are going to return cached information based on this condition:

      if (preSets.getFromCache || (preSets.saveToCache && !MM.deviceConnected())) {

        Attachments

          Activity

            People

            Assignee:
            jleyva Juan Leyva
            Reporter:
            jleyva Juan Leyva
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              18/Jul/14