Class FolderListingCache

java.lang.Object
io.jenkins.plugins.akeyless.synced.supplier.FolderListingCache

public final class FolderListingCache extends Object
Caches recursive list-items results for folder-only discovery to avoid hammering Akeyless on every CredentialsProvider#getCredentials call.
  • Field Details

    • DEFAULT_CACHE_TTL_SECONDS

      public static final int DEFAULT_CACHE_TTL_SECONDS
      Align with AWS Secrets Manager Credentials Provider cache wording/duration (5 minutes).
      See Also:
  • Method Details

    • invalidate

      public static void invalidate()
      Clears the cache (used when config changes materially).
    • getOrLoad

      @Nonnull public static List<String> getOrLoad(@Nonnull AkeylessSyncedClient client, @Nonnull String folderNormalized, boolean cacheEnabled, @Nullable String ownerUserId) throws io.akeyless.client.ApiException
      Loads folder contents, using the in-memory cache when cacheEnabled is true.
      Throws:
      io.akeyless.client.ApiException
    • getOrLoad

      @Nonnull public static List<String> getOrLoad(@Nonnull AkeylessSyncedClient client, @Nonnull String folderNormalized, boolean cacheEnabled) throws io.akeyless.client.ApiException
      Throws:
      io.akeyless.client.ApiException