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

Refresh option should invalidate caches instead purging it

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 1.5
    • 1.4.4
    • Caching
    • MOODLE_14_STABLE
    • MOODLE_15_STABLE

      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())) {

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

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.