Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add eviction/removal listeners #401

Merged
merged 22 commits into from
Feb 21, 2022

Conversation

matteocastellotti
Copy link
Contributor

@matteocastellotti matteocastellotti commented Jan 25, 2022

Added the possibility to add an eviction/removal listener when configuring the cache

@CLAassistant
Copy link

CLAassistant commented Jan 25, 2022

CLA assistant check
All committers have signed the CLA.

dependabot bot and others added 15 commits February 13, 2022 11:08
…icronaut-projects#400)

Bumps [io.micronaut.build.shared.settings](https://github.com/micronaut-projects/micronaut-build) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/micronaut-projects/micronaut-build/releases)
- [Commits](micronaut-projects/micronaut-build@v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: io.micronaut.build.shared.settings
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [spock](https://github.com/testcontainers/testcontainers-java) from 1.16.2 to 1.16.3.
- [Release notes](https://github.com/testcontainers/testcontainers-java/releases)
- [Changelog](https://github.com/testcontainers/testcontainers-java/blob/master/CHANGELOG.md)
- [Commits](testcontainers/testcontainers-java@1.16.2...1.16.3)

---
updated-dependencies:
- dependency-name: org.testcontainers:spock
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…cronaut-projects#403)

Bumps [peter-evans/create-pull-request](https://github.com/peter-evans/create-pull-request) from 3.12.0 to 3.12.1.
- [Release notes](https://github.com/peter-evans/create-pull-request/releases)
- [Commits](peter-evans/create-pull-request@v3.12.0...v3.12.1)

---
updated-dependencies:
- dependency-name: peter-evans/create-pull-request
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ut-projects#407)

Bumps [mikepenz/action-junit-report](https://github.com/mikepenz/action-junit-report) from 2.9.0 to 2.9.1.
- [Release notes](https://github.com/mikepenz/action-junit-report/releases)
- [Commits](mikepenz/action-junit-report@v2.9.0...v2.9.1)

---
updated-dependencies:
- dependency-name: mikepenz/action-junit-report
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* use Gradle 7.4

* cleanup

* use Micronaut 3.3.1

* make cache-tck a module so it gets published
@alvarosanchez
Copy link
Member

@matteocastellotti thanks for your contribution! Could you please add a note at https://github.com/micronaut-projects/micronaut-cache/blob/master/src/main/docs/guide/cache-abstraction.adoc mentioning that this is possible? Otherwise, this would go unnoticed.

@graemerocher
Copy link
Contributor

Thanks for considering contributing, but I am not sure this implementation makes sense as written:

  1. It works only for caffeine even though the configuration is added to cache-core
  2. It has no tests whatsoever

caches:
my-cache:
listen-to-removals: true
listen-to-evictions: true

Choose a reason for hiding this comment

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

How do you configure a new listener? If there are more than one cache, each needing a different listener, how do you configure that?

@matteocastellotti
Copy link
Contributor Author

matteocastellotti commented Feb 15, 2022

@graemerocher I added a new configuration layer for the parameters related to caffeine cache and the test to verify that the implementation works

@alvarosanchez
Copy link
Member

There are some Checkstyle failures

@graemerocher graemerocher merged commit 1d5f834 into micronaut-projects:master Feb 21, 2022
@graemerocher
Copy link
Contributor

Thanks for the contribution!

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.

None yet

7 participants