Skip to content

[rest] Make RESTTokenFileIO cache maximum size configurable - #9528

Open
tonymtu wants to merge 1 commit into
apache:masterfrom
tonymtu:rest-token-file-io-cache-size
Open

[rest] Make RESTTokenFileIO cache maximum size configurable#9528
tonymtu wants to merge 1 commit into
apache:masterfrom
tonymtu:rest-token-file-io-cache-size

Conversation

@tonymtu

@tonymtu tonymtu commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Purpose

RESTTokenFileIO uses a cache with a fixed maximum size of 1000. When the cache reaches this limit, a FileIO that is still in use may be evicted and closed prematurely.

This PR adds RESTTokenFileIO#setFileIOCacheMaximumSize(long), allowing applications to configure the cache size during initialization according to their workloads.

To keep this change focused, this PR does not introduce reference counting or change the FileIO lifecycle management.

Tests

Added a unit test to verify that the maximum cache size can be updated.

@ArnavBalyan ArnavBalyan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! It seems the current PR is a no op, should this be wired up to a config or an upstream caller leveraging the new API

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.

2 participants