Skip to content

Commit

Permalink
#284 add more cacheable
Browse files Browse the repository at this point in the history
  • Loading branch information
junchensz committed Oct 18, 2019
1 parent d6ae7f7 commit 113be41
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@

@CacheConfig(cacheManager = "requestScopedCacheManager", cacheNames = "admCiTypeAttrRepository")
public interface AdmCiTypeAttrRepository extends JpaRepository<AdmCiTypeAttr, Integer> {
@Cacheable("admCiTypeAttrRepository-findAllByCiTypeId")
List<AdmCiTypeAttr> findAllByCiTypeId(Integer ciTypeId);

@Cacheable("admCiTypeAttrRepository-findAllByAdmCiType_idAdmCiTypeAndStatus")
List<AdmCiTypeAttr> findAllByAdmCiType_idAdmCiTypeAndStatus(Integer ciTypeId, List<String> statuses);

/**
Expand Down Expand Up @@ -68,7 +70,7 @@ public interface AdmCiTypeAttrRepository extends JpaRepository<AdmCiTypeAttr, In
List<AdmCiTypeAttr> findByCiTypeIdAndIsRefreshable(int ciTypeId, int isRefreshable);

//for cache purpose
@Cacheable("ciType-attributes")
@Cacheable("admCiTypeAttrRepository-getOne")
AdmCiTypeAttr getOne(Integer id);

}

0 comments on commit 113be41

Please sign in to comment.