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.java
        0.6 kB
        Josh Canfield
      2. BasicAjax.tml
        0.3 kB
        Josh Canfield

        Activity

        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12568704 ] jira [ 12591730 ]
        Mark Thomas made changes -
        Workflow jira [ 12428586 ] Default workflow, editable Closed status [ 12568704 ]
        Howard M. Lewis Ship made changes -
        Status In Progress [ 3 ] Closed [ 6 ]
        Fix Version/s 5.0.12 [ 12313048 ]
        Resolution Fixed [ 1 ]
        Howard M. Lewis Ship made changes -
        Summary Cached values for methods annotated with @Cache do not reset at end of Ajax request Cached values for methods annotated with @Cached do not reset at end of Ajax request
        Howard M. Lewis Ship made changes -
        Summary Cached methods not cleaned up after ajax request Cached values for methods annotated with @Cache do not reset at end of Ajax request
        Howard M. Lewis Ship made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        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();
        Josh Canfield made changes -
        Attachment BasicAjax.java [ 12379753 ]
        Hide
        Josh Canfield added a comment -

        Example page class

        Show
        Josh Canfield added a comment - Example page class
        Josh Canfield made changes -
        Field Original Value New Value
        Attachment BasicAjax.tml [ 12379752 ]
        Hide
        Josh Canfield added a comment -

        Example template

        Show
        Josh Canfield added a comment - Example template
        Josh Canfield created issue -

          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