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

Revisit CFG->filelifetime implementation and uses

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.6
    • 2.6
    • Files API
    • MOODLE_26_STABLE
    • MOODLE_26_STABLE
    • w45_MDL-42387_m26_filelifetime
    • 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
    • 5
    • 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

              skodak Petr Skoda
              stronk7 Eloy Lafuente (stronk7)
              Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
              Damyon Wiese Damyon Wiese
              Michael de Raadt Michael de Raadt
              Matteo Scaramuccia, Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                18/Nov/13