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

Improve cacheability of assignfeedback_editpdf/stamps

    XMLWordPrintable

Details

    • MOODLE_310_STABLE
    • MOODLE_310_STABLE
    • MDL-68665-assign-stamp-cache
    • 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

    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

              jamie.stamp Jamie Stamp
              brendanheywood Brendan Heywood
              Brendan Heywood Brendan Heywood
              Andrew Lyons Andrew Lyons
              Anna Carissa Sadia Anna Carissa Sadia
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                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