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

Refresh option should invalidate caches instead purging it

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.4.4
    • 1.5
    • Caching
    • MOODLE_14_STABLE
    • 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

            jleyva Juan Leyva
            jleyva Juan Leyva
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              18/Jul/14