Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-2756

Allow developers define whether a page should be cached as a soft reference or not

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 5.8.3
    • tapestry-core
    • None

    Description

      This ticket is the result of a discussion on the Tapestry mailing list about the consequences of caching page instances using soft references instead of regular ones: https://lists.apache.org/thread/5qbyg0mfscg9qj6jho9899rh4r0kz97z. The goal here is to allow the developer to define which pages should be cached as soft references (the default) or regular ones.

      Usage example

      public static void contributePageCachingReferenceTypeService(
      OrderedConfiguration<PageCachingReferenceTypeService> configuration)

      { configuration.add("VeryLarge", p -> p.equals("VeryLarge") ? ReferenceType.STRONG : null); }

      This would cause the page named VeryLarge to be cached using a
      regular, strong, non-garbage-collectable reference while leaving all
      other pages cached with a soft, garbage-collectable reference.

      Attachments

        Activity

          People

            thiagohp Thiago Henrique De Paula Figueiredo
            thiagohp Thiago Henrique De Paula Figueiredo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: