caishunfeng commented on a change in pull request #7161:
URL: https://github.com/apache/dolphinscheduler/pull/7161#discussion_r762393715



##########
File path: 
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/mapper/WorkerGroupMapper.java
##########
@@ -23,19 +23,34 @@
 
 import java.util.List;
 
+import org.springframework.cache.annotation.CacheConfig;
+import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.Cacheable;
+
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 
 /**
  * worker group mapper interface
  */
+@CacheConfig(cacheNames = "workerGroup", keyGenerator = "cacheKeyGenerator")
 public interface WorkerGroupMapper extends BaseMapper<WorkerGroup> {
 
     /**
      * query all worker group
      * @return worker group list
      */
+    @Cacheable(sync = true, key = "'-'")

Review comment:
       is better to set key like 'all' ?

##########
File path: 
dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/aspect/CacheEvictAspect.java
##########
@@ -99,4 +113,29 @@ private CacheType getCacheType(CacheConfig cacheConfig, 
CacheEvict cacheEvict) {
         }
         return null;
     }
+
+    private String parseKey(String key, List<String> paramNameList, 
List<Object> paramList) {
+        SpelExpressionParser spelParser = new SpelExpressionParser();
+        //将方法的参数名和参数值一一对应的放入上下文中

Review comment:
       Please use english for it.




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