Skip to content

Spring cache with Caffeine and micrometer measurements - #448

Merged
radudoros merged 4 commits into
developmentfrom
spring_cache
Oct 7, 2026
Merged

radudoros merged 4 commits into
developmentfrom
spring_cache

Conversation

@radudoros

@radudoros radudoros commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Added Caffeine cache as a replacement to our guava wrapped implementation.
Additionally added micrometer and configured sending measurements for tagged solr queries and cache stats.

Addresses also #157

@clarin-bot

clarin-bot commented Sep 16, 2026 •

Copy link
Copy Markdown

⛔ Snyk checks have failed. 48 issues have been found so far.

Status Scan Engine Critical High Medium Low Total (48)
⛔ Open Source Security 10 38 0 0 48 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@radudoros radudoros changed the title Spring cache Spring cache and Caffeine Sep 16, 2026
@radudoros radudoros changed the title Spring cache and Caffeine Spring cache with Caffeine and micrometer measurements Sep 16, 2026
@radudoros
radudoros requested a review from twagoo September 17, 2026 09:19

@twagoo twagoo 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.

It looks good! I have no experience with Micrometer, but I saw in the documentation that it has a few annotations. I wonder about @Timed in particular, and whether it could be used to make the timing in the SolrDaoImpl and its children a bit more declarative and clean. If not, I think this is perfectly accessible.

@radudoros

radudoros commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks! I looked a bit at @Timed: it needs some TimedAspect thing with Spring AOP/AspectJ (which Spring Boot would wire for us, but we're on plain Spring), and since fireQuery is called internally it wouldn't be intercepted.

I wanted to manage this PR - I wanted to test the whole setup locally before, to see if the grafana and graphite pick everything correctly. I'll merge it after my checks I wanted to do.

@radudoros
radudoros merged commit 081bed9 into development Oct 7, 2026
2 of 3 checks passed
@radudoros
radudoros deleted the spring_cache branch October 7, 2026 13:17
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