Tapestry
  1. Tapestry
  2. TAPESTRY-2338

Cached values for methods annotated with @Cached do not reset at end of Ajax request

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.0.11
    • Fix Version/s: 5.0.12
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      Contents of a @Cached method are not re-evaluated after the first ajax call until a full page refresh has occurred.

      1. BasicAjax.tml
        0.3 kB
        Josh Canfield
      2. BasicAjax.java
        0.6 kB
        Josh Canfield

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        The issue is that the CachedWorker generates code that cleans the cache during the PostRenderCleanup phase.

        I think we can get the same effect by performing that cleanup from PageLifecycleListener.containingPageDidDetach();

        Show
        Howard M. Lewis Ship added a comment - The issue is that the CachedWorker generates code that cleans the cache during the PostRenderCleanup phase. I think we can get the same effect by performing that cleanup from PageLifecycleListener.containingPageDidDetach();
        Hide
        Josh Canfield added a comment -

        Example page class

        Show
        Josh Canfield added a comment - Example page class
        Hide
        Josh Canfield added a comment -

        Example template

        Show
        Josh Canfield added a comment - Example template

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Josh Canfield
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development