Skip to content

Conversation

@acoburn
Copy link
Collaborator

@acoburn acoburn commented Apr 7, 2023

This adds a cache abstraction to the client libraries along with two implementations.

The new interfaces are:

  • com.inrupt.client.ClientCache - A generalizable cache abstraction with ::get, ::put and ::invalidate methods
  • com.inrupt.client.spi.CacheBuilderService - A generalizable cache builder with a method defining the size and retention duration

There are two new modules that implement these interfaces:

  • Caffeine (inrupt-client-caffeine) - this implementation is reportedly faster than guava and has some nice features that we will want to use later
  • Guava (inrupt-client-guava) - this implementation is widely used and will also work on Android

There is also a no-op implementation for cases where no cache support is desired. The no-op implementation is the default if no other service is registered, which also gives the code backwards compatibility.

This code is integrated into the OpenID, UMA and AccessGrant modules for handling metadata caching.

@acoburn acoburn requested a review from a team as a code owner April 7, 2023 14:51
@acoburn acoburn temporarily deployed to ESS PodSpaces April 7, 2023 14:51 — with GitHub Actions Inactive
@acoburn acoburn temporarily deployed to ESS PodSpaces April 7, 2023 14:51 — with GitHub Actions Inactive
@acoburn acoburn temporarily deployed to ESS DevNext April 7, 2023 14:51 — with GitHub Actions Inactive
@acoburn acoburn temporarily deployed to ESS PodSpaces April 7, 2023 16:47 — with GitHub Actions Inactive
@acoburn acoburn temporarily deployed to ESS PodSpaces April 7, 2023 16:47 — with GitHub Actions Inactive
@acoburn acoburn temporarily deployed to ESS DevNext April 7, 2023 16:47 — with GitHub Actions Inactive
@acoburn acoburn temporarily deployed to ESS PodSpaces April 7, 2023 17:18 — with GitHub Actions Inactive
@acoburn acoburn temporarily deployed to ESS PodSpaces April 7, 2023 17:18 — with GitHub Actions Inactive
@acoburn acoburn temporarily deployed to ESS DevNext April 7, 2023 17:18 — with GitHub Actions Inactive
@acoburn acoburn temporarily deployed to ESS PodSpaces April 10, 2023 12:26 — with GitHub Actions Inactive
@acoburn acoburn temporarily deployed to ESS PodSpaces April 10, 2023 12:26 — with GitHub Actions Inactive
@acoburn acoburn temporarily deployed to ESS DevNext April 10, 2023 12:26 — with GitHub Actions Inactive
@timea-solid timea-solid temporarily deployed to ESS PodSpaces April 11, 2023 07:16 — with GitHub Actions Inactive
@timea-solid timea-solid temporarily deployed to ESS PodSpaces April 11, 2023 07:16 — with GitHub Actions Inactive
@timea-solid timea-solid temporarily deployed to ESS DevNext April 11, 2023 07:16 — with GitHub Actions Inactive
Copy link
Contributor

@timea-solid timea-solid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting.
Elegant implementation.

@acoburn acoburn temporarily deployed to ESS PodSpaces April 11, 2023 10:43 — with GitHub Actions Inactive
@acoburn acoburn temporarily deployed to ESS PodSpaces April 11, 2023 10:43 — with GitHub Actions Inactive
@acoburn acoburn temporarily deployed to ESS DevNext April 11, 2023 10:43 — with GitHub Actions Inactive
@acoburn acoburn enabled auto-merge (squash) April 11, 2023 10:43
@acoburn acoburn merged commit 2b65ce0 into main Apr 11, 2023
@acoburn acoburn deleted the JCL-279-cache-abstraction branch April 11, 2023 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants