Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-42387

Revisit CFG->filelifetime implementation and uses

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.6
    • Fix Version/s: 2.6
    • Component/s: Files API
    • Labels:
    • Testing Instructions:
      Hide

      1/ test files in all affected areas - see diff, make sure there are no errors in error log file
      2/ create page activity with embedded images and verify the default lifetime is 6 hours
      3/ edit your config.php - add $CFG->filelifetime = 60*60; and verify the new lifetime is 1 hour

      Show
      1/ test files in all affected areas - see diff, make sure there are no errors in error log file 2/ create page activity with embedded images and verify the default lifetime is 6 hours 3/ edit your config.php - add $CFG->filelifetime = 60*60; and verify the new lifetime is 1 hour
    • Affected Branches:
      MOODLE_26_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w45_MDL-42387_m26_filelifetime
    • Story Points:
      5
    • Sprint:
      BACKEND Sprint 6

      Description

      Doing some innocent testing of MDL-38743 it was discovered that CFG->filelifetime is not used as often as desirable.

      See point B1 in that issue.

      This is about to consider how we could be using it better and apply that new approach everywhere.

      Perhaps it may have sense to move it to within the sendfile functions, so they continue accepting arbitrary lifetimes, but it CFG->filelifetime is set, it takes precedence. Or perhaps it only takes precedence if another settings says "force"… or only smaller accepted if debugging is enabled…

      The trick here is to decide the behavior that should help both sites wanting to put a longer TTL and developers wanting to use small values for testing. While observing for it in as many places as possible (if set).

      That is it, ciao

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              skodak Petr Skoda
              Reporter:
              stronk7 Eloy Lafuente (stronk7)
              Peer reviewer:
              Eloy Lafuente (stronk7)
              Integrator:
              Damyon Wiese
              Tester:
              Michael de Raadt
              Participants:
              Component watchers:
              Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/13