aws / aws/aws-encryption-sdk-java

Make CryptoMaterialsCache return stats

Open
#125 1 comment 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
240
Forks
125
PR merge metrics
No merged PRs in 30d

Description

I'd like to collect some metrics on caching for performance optimization and CryptoMaterialsCache currently doesn't provide a way to collect stats such as size, hit, and miss. Could the CryptoMaterialsCache class be wired up to provide something similar to Caffeine or Guava cache such as size() and snapshot()?

Here are some examples:
https://github.com/ben-manes/caffeine/blob/master/caffeine/src/main/java/com/github/benmanes/caffeine/cache/stats/CacheStats.java#L60
https://github.com/google/guava/blob/master/guava/src/com/google/common/cache/LocalCache.java#L4913
https://github.com/google/guava/blob/master/guava/src/com/google/common/cache/AbstractCache.java#L239

Contributor guide

Open the contributing guide

Research direction

Start by locating the CryptoMaterialsCache class and reviewing how its cache entries and access paths are managed. Compare the requested size(), snapshot(), hit, and miss metrics with the linked Caffeine and Guava examples. Done means the cache exposes the requested statistics in a documented, usable form and the relevant behavior is covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cryptography, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.