adamsaghy commented on code in PR #4570:
URL: https://github.com/apache/fineract/pull/4570#discussion_r2058244113
##########
fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepository.java:
##########
@@ -28,16 +31,57 @@
import org.springframework.stereotype.Repository;
@Repository
+@CacheConfig(cacheNames = "currencies")
public interface ApplicationCurrencyRepository
extends JpaRepository<ApplicationCurrency, Long>,
JpaSpecificationExecutor<ApplicationCurrency> {
String FIND_CURRENCY_DETAILS = "SELECT new
org.apache.fineract.organisation.monetary.data.CurrencyData(ac.code, ac.name,
ac.decimalPlaces, ac.inMultiplesOf, ac.displaySymbol, ac.nameCode) FROM
ApplicationCurrency ac ";
+ @Cacheable(key = "#currencyCode")
ApplicationCurrency findOneByCode(String currencyCode);
+ @Cacheable(key = "#currencyCode")
Review Comment:
I think it is not right to use the very same cache key (currencyCode) of the
very same cache (currencies), but different response objects. It is conflicting
imho.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]