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

Purge additional memcache servers

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      You will need two instances of memcached running. On my mac (linux should be the same) you can start two by doing:

      memcached -p 11211 &

      memcached -p 11210 &

      1. In a shell, run

        echo stats | nc 127.0.0.1 11210|grep cmd_flush

        and

        echo stats | nc 127.0.0.1 11211|grep cmd_flush

        and note the results for each

      2. Create a new memcache caching instance
      3. Add the name LocalMemcache and Server "localhost:11211"
      4. Save with all the remaining default settings.
      5. Add the LocalMemcache store to the Language string cache
      6. Click purge next to the new LocalMemcache cache.
      7. In a shell, run

        echo stats | nc 127.0.0.1 11211|grep cmd_flush

        and

        echo stats | nc 127.0.0.1 11210|grep cmd_flush

        and note the results for each.

      8. We expect the numbers returned (when compared to the respective values in step 1) to have gone up for the first one, and not changed for the second one.
      9. Go in and edit the LocalMemcache. Under Additional servers to purge, add "127.0.0.1:11210"
      10. Save
      11. Click purge next to the new LocalMemcache cache.
      12. In a shell, run

        echo stats | nc 127.0.0.1 11211|grep cmd_flush

        and

        echo stats | nc 127.0.0.1 11210|grep cmd_flush

        and note the results for each.

      13. We expect both respective values returned to have increased when compared to step 7.
      Show
      You will need two instances of memcached running. On my mac (linux should be the same) you can start two by doing: memcached -p 11211 & memcached -p 11210 & In a shell, run echo stats | nc 127.0.0.1 11210|grep cmd_flush and echo stats | nc 127.0.0.1 11211|grep cmd_flush and note the results for each Create a new memcache caching instance Add the name LocalMemcache and Server "localhost:11211" Save with all the remaining default settings. Add the LocalMemcache store to the Language string cache Click purge next to the new LocalMemcache cache. In a shell, run echo stats | nc 127.0.0.1 11211|grep cmd_flush and echo stats | nc 127.0.0.1 11210|grep cmd_flush and note the results for each. We expect the numbers returned (when compared to the respective values in step 1) to have gone up for the first one, and not changed for the second one. Go in and edit the LocalMemcache. Under Additional servers to purge, add "127.0.0.1:11210" Save Click purge next to the new LocalMemcache cache. In a shell, run echo stats | nc 127.0.0.1 11211|grep cmd_flush and echo stats | nc 127.0.0.1 11210|grep cmd_flush and note the results for each. We expect both respective values returned to have increased when compared to step 7.
    • Affected Branches:
      MOODLE_25_STABLE
    • Pull Master Branch:

      Description

      Basically porting MDL-42071 to memcache. Allows for additional servers to be flushed with purge is called.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                emerrill Eric Merrill
                Reporter:
                emerrill Eric Merrill
                Peer reviewer:
                Dan Poltawski
                Participants:
                Component watchers:
                Matteo Scaramuccia, David Monllaó, Víctor Déniz Falcón
              • Votes:
                2 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: