-
Notifications
You must be signed in to change notification settings - Fork 28
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
Support sync property in @Cacheable annotation #323
Comments
Hi @TheHett, Please share your project (github repo?)/code examples including the configuration classes, service/logic layer and any usages of @Cacheable, @CachePut and @CacheEvict annotations. Thanks for showing interest. |
@roimenashe thanks,
|
@TheHett You're right, we currently don't support sync = true option in @Cacheable annotation. |
@roimenashe without this option NPE still occurs, but in anoter the class:
|
@TheHett In order for @Cacheable to work it requires an id, when the next execution of the method annotated with @Cacheable it checks wether the id exists in the cache - if so it fetches the data from the cache, if the id doesn't exist in the cache - a "cache miss" will occur, the data will be fetched from the main store and will also be inserted to the cache for next executions. |
@roimenashe can we please fix NPE with validation that id is present and throw illegalargumentexception if it is not? |
@Aloren |
@TheHett But you are right, this isn't the reason for the null pointer exception, the NPE occurs due to lack of persistent entity which is mentioned in the NPE:
The idea of Spring Data Aerospike is to use @document annotated classes for persistent. @Aloren |
@roimenashe in MappingAerospikeWriteConverter line 73: |
Thanks @Aloren, |
thanks |
The issue has been resolved, |
Hi, configured Spring Boot like this article:
https://medium.com/aerospike-developer-blog/caching-with-spring-boot-and-aerospike-17b91267d6c
But have NPE:
This line on AerospikeCache:166 looks strange:
because the contract of method
client.get
says thatnull
is possible.The text was updated successfully, but these errors were encountered: