/** * Find model by cache. * @see #find(String, Object...) * @param cacheName the cache name * @param key the key used to get data from cache * @return the list of Model */ public List findByCache(String cacheName, Object key, String sql, Object... paras) { ICache cache = getConfig().getCache(); List result = cache.get(cacheName, key); if (result == null) { // 这里 result = find(sql, paras); cache.put(cacheName, key, result); // 这里 } return result; }