Skip to content

Add pluggable expression cache interface with LRU and TTL support - #431

Open
coreyho wants to merge 1 commit into
alibaba:mainfrom
coreyho:feature/expression-cache
Open

Add pluggable expression cache interface with LRU and TTL support#431
coreyho wants to merge 1 commit into
alibaba:mainfrom
coreyho:feature/expression-cache

Conversation

@coreyho

@coreyho coreyho commented Mar 23, 2026

Copy link
Copy Markdown

This commit introduces a new ExpressionCache interface that allows users to provide custom cache implementations for compiled expressions.

Features:

  • ExpressionCache interface for custom cache implementations
  • DefaultExpressionCache with LRU eviction and TTL expiration
  • CacheConfig with builder pattern for flexible configuration
  • SimpleExpressionCache as default thread-safe unlimited cache
  • Integration with Express4Runner and InitOptions

Usage example:
CacheConfig config = CacheConfig.builder() .maxSize(1000) .ttl(10, TimeUnit.MINUTES) .lruEnabled(true) .build(); InitOptions options = InitOptions.builder() .cacheConfig(config) .build(); Express4Runner runner = new Express4Runner(options);

Documentation updated in README-source.adoc and README-EN-source.adoc.

This commit introduces a new ExpressionCache interface that allows users to
provide custom cache implementations for compiled expressions.

Features:
- ExpressionCache interface for custom cache implementations
- DefaultExpressionCache with LRU eviction and TTL expiration
- CacheConfig with builder pattern for flexible configuration
- SimpleExpressionCache as default thread-safe unlimited cache
- Integration with Express4Runner and InitOptions

Usage example:
  CacheConfig config = CacheConfig.builder()
      .maxSize(1000)
      .ttl(10, TimeUnit.MINUTES)
      .lruEnabled(true)
      .build();
  InitOptions options = InitOptions.builder()
      .cacheConfig(config)
      .build();
  Express4Runner runner = new Express4Runner(options);

Documentation updated in README-source.adoc and README-EN-source.adoc.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@CLAassistant

CLAassistant commented Mar 23, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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