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

Improve cacheability of assignfeedback_editpdf/stamps

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      1) Create two different assignment instances

      2) Create two test students users

      3) As both students submit an assignment (pdf to be easiest)

      4) As a marker grade both assignments, and use the stamp tool to add multiple stamps to both submissions

      5) Open the dev tools and reload the marking UI, go to the network tab and then filter for the stamp urls, do this for all assignment / student combinations

      6) Confirm that all the stamp urls for the same stamp have the same identical url (eg the cross stamp is always the same url)

      7) Confirm that the url is served with immutable + cache headers and with a far future expiry

      Show
      1) Create two different assignment instances 2) Create two test students users 3) As both students submit an assignment (pdf to be easiest) 4) As a marker grade both assignments, and use the stamp tool to add multiple stamps to both submissions 5) Open the dev tools and reload the marking UI, go to the network tab and then filter for the stamp urls, do this for all assignment / student combinations 6) Confirm that all the stamp urls for the same stamp have the same identical url (eg the cross stamp is always the same url) 7) Confirm that the url is served with immutable + cache headers and with a far future expiry
    • Affected Branches:
      MOODLE_310_STABLE
    • Fixed Branches:
      MOODLE_310_STABLE
    • Pull 3.10 Branch:
      MDL-68665-310-assign-stamp-cache
    • Pull Master Branch:
      MDL-68665-assign-stamp-cache

      Description

      Today we had 40k requests like this:

      /pluginfile.php/12345/assignfeedback_editpdf/stamps/12345/tick.png

      Almost all of them are unique urls (31k urls) with different ids for each assignment activity and I think possibly for each individual assignment. As far as I can tell these 40k urls map to 4 unique stamps: smile, sad, tick, cross.

      Proposing:

      1) These all map to the same urls so they get cached

      2) All 'stamp' files are served as public cache control immutable so varnish / cdn's can serve these instead of hitting php land

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jamie.stamp Jamie Stamp
              Reporter:
              brendanheywood Brendan Heywood
              Peer reviewer:
              Brendan Heywood
              Integrator:
              Andrew Nicols
              Tester:
              Anna Carissa Sadia
              Participants:
              Component watchers:
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan, Matteo Scaramuccia, Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Nov/20

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 5 hours, 10 minutes
                  5h 10m