Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.0
    • Fix Version/s: ice box
    • Component/s: None
    • Labels:
      None

      Description

      A major benefit of HTTP is the possibility of transparent caching. Such caches not only make sense as separate proxy caches and caches on the server, but have proven useful especially built into the client applications (best example is the typical web browser which speeds up loading by reusing fresh objects found within its local cache).

      When providing a specification for a Client API for JAX-RS, it makes very much sense to support local caching.

      (a) Automatic use of local caches

      Java SE since long time comes with support for local caches, but actually did never supply an implementation for one, so least people know about this feature. So without automatic use of local cache by the Client API implementation itself, the typical Client API consumer will build the cache into his application. But such a cache shouldn't be part of the application, as there is just no difference between that cache and any other cache for any other Client API based applilcation.

      So it makes pretty sense that the Client API provides features to enable or disable local caching and then make use of local caches itself, without further caches coded into the surrounding application.

      As a client's source code shall not be dependent of any particular implementation of the Client API, the API for configuring the cache must be part of the JAX-RS specification.

      (b) Answering conditional requests using local caches

      The Client API is expected to support conditional requests. It makes sense that before sending the request the local cache is checked whether it contains a fresh object fulfilling the request (e. g. when having asked for a resource before and now asking for a fragment of it, or when polling frequently for the same resource but the resource was configured by the server to stay fresh for rather long time).

      As a client programmer likes to guarantee how his application works (i. e. whether it does local caching or not), it must be clearly specified by the JAX-RS specification, that an implementation must resolve conditional requests first using local caches, as soon as local caches are enabled by the client program using the JAX-RS Client API.

        Activity

        Hide
        Marek Potociar added a comment -

        Downgraded and retargeted based on the outcome of the EG discussion:
        http://java.net/projects/jax-rs-spec/lists/jsr339-experts/archive/2011-05/thread/1#00006

        Show
        Marek Potociar added a comment - Downgraded and retargeted based on the outcome of the EG discussion: http://java.net/projects/jax-rs-spec/lists/jsr339-experts/archive/2011-05/thread/1#00006
        Hide
        Marek Potociar added a comment -

        Un-assigning for now.

        Show
        Marek Potociar added a comment - Un-assigning for now.
        Hide
        puce added a comment -

        Any update on this feature request?

        Show
        puce added a comment - Any update on this feature request?

          People

          • Assignee:
            Unassigned
            Reporter:
            mkarg
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: