Uploaded image for project: 'Advanced Cache'
  1. Advanced Cache
  2. MGNLADVCACHE-17

ServeUntilRecachedPolicy and NotifyFlushListeningPolicy don't work with policies sets

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.3.2
    • 1.3
    • None
    • None

      We have got a problem with the advanced cache in our Magnolia 4.4.2 EE setup.
      We have setup the Advanced Cache module according to http://documentation.magnolia-cms.com/modules/advanced-cache.html with /modules/cache/config/configurations/default/cachePolicy/class set to info.magnolia.module.advancedcache.ServeUntilRecachedCachePolicy and /modules/cache/config/configurations/default/flushPolicy/class set to info.magnolia.module.advancedcache.NotifyFlushListeningPolicy.

      In our developing/testing environment this works fine. The problems occur on our productive environment:

      • we have 1 author instance with 2 subscriber instances (author.domain.de publishes to public01.domain.de and public02.domain.de)
      • the subscribers are behind a netscaler that divides the load between the 2 public nodes
      • browsers access www.domain.de and get either node 1 or 2

      The problem seems to be, that the cache is never invalidated:

      • page in version 1 is published
      • browser gets page via netscaler in version 1
      • page in version 2 is published
      • accessing the 2 publish nodes directly delivers the correct response
      • accessing them via netscaler shows the old (cached) version indefinitely --> it is never invalidated

      Two observations:

      • only flushing the magnolia cache manually solves the problem (until the next update) so it must definitely be the magnolia cache
      • removing one server node from the netscaler (and thus effectively reducing it to a forward to the other node) yields the same problem

      One more thing: as I understand it, the keys for the cache are the URLs of the pages. Could it be, that our setup with 2 public nodes with distinct URLs (which work fine cache wise) are accessed through another URL (via netscaler) generates problems with this caching policy? Such as, the URL accessed (www.domain.de/test.html) is never invalidated, the 2 nodes only invalidate their own respective caches with keys/URLs like public01.domain.de/test.html and public02.domain.de/test.html).

      Page headers are set to "don't cache at all" (i.e. "Expires = 01.01.1970", "Cache-Control = no-cache, no-store, must-revalidate, max-age=0", "Pragma = no-cache") and still the old content is shown in the browser. So it can't be the netscaler caching content based on headers. Also browser cache can't be an issue, because it is disabled.

      Is this a common issue? How do we work around it? We would really like to use the ServeUntilRecachedCachePolicy as it fits our requirements the best.

      Read the enclosed logfile as follows:

      • entries at 15:29:xx contain a activation of test content and accessing the test page on the public nodes (with the old version still shown)
      • entries at 15:32:xx contain a flush of magnolia cache and accessing the test page on the public nodes (with the new version correctly delivered)

        Acceptance criteria

              had Jan Haderka
              ckutschke Christian Kutschke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD