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

make file operations more atomic in theme image, css and other javascript serving scripts

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.3
    • Fix Version/s: 2.3
    • Component/s: General
    • Labels:

      Description

      The problem is similar to lang caching, sometimes the files may be read before we complete the actual writing of cache files, this might result in broken/incomplete data landing in proxy or browser caches:

      • /lib/javascript.php
      • /theme/image.php
      • /theme/styles.php
      • /theme/javascript.php

      The more we cache the worse this can get...

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            skodak Petr Skoda added a comment - - edited

            The patch should resolve all potential theme and JS file caching problems. It relies on the fact that:
            1/ copy() does not override existing files
            2/ fopen() 'xb' flag only creates file if does not exist
            3/ if we for any reason can not create the cache file we try to send uncached information instead
            4/ cache operations are not interrupted by user abort any more

            Show
            skodak Petr Skoda added a comment - - edited The patch should resolve all potential theme and JS file caching problems. It relies on the fact that: 1/ copy() does not override existing files 2/ fopen() 'xb' flag only creates file if does not exist 3/ if we for any reason can not create the cache file we try to send uncached information instead 4/ cache operations are not interrupted by user abort any more
            Hide
            poltawski Dan Poltawski added a comment -

            Integrated, thanks

            Show
            poltawski Dan Poltawski added a comment - Integrated, thanks
            Hide
            skodak Petr Skoda added a comment -

            yay, thanks a lot!!

            Show
            skodak Petr Skoda added a comment - yay, thanks a lot!!
            Hide
            ankit_frenz Ankit Agarwal added a comment -

            No issues, all seems to be working fine.
            Passing
            Thanks!

            Show
            ankit_frenz Ankit Agarwal added a comment - No issues, all seems to be working fine. Passing Thanks!
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            This is now part of Moodle and a few millions people around the globe will be using it soon. Isn't that awesome?

            Many, many thanks and don't forget http://youtu.be/4N7dPaP5Z8U

            Closing, ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - This is now part of Moodle and a few millions people around the globe will be using it soon. Isn't that awesome? Many, many thanks and don't forget http://youtu.be/4N7dPaP5Z8U Closing, ciao

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  25/Jun/12