budaidev commented on code in PR #4570:
URL: https://github.com/apache/fineract/pull/4570#discussion_r2055906787


##########
fineract-core/src/main/java/org/apache/fineract/organisation/monetary/domain/ApplicationCurrencyRepository.java:
##########
@@ -28,16 +30,20 @@
 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")
     @Query(FIND_CURRENCY_DETAILS + " WHERE ac.code = :code")
     CurrencyData findCurrencyDataByCode(@Param("code") String currencyCode);
 
+    @Cacheable
     @Query(FIND_CURRENCY_DETAILS)
     List<CurrencyData> findAllSorted(Sort sort);

Review Comment:
   I added the CacheEvict for the other operations



-- 
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]

Reply via email to