private <E> void doCache(MappedStatement ms, PageMyBatis<E> result, Object parameter, RowBounds rowBounds) {
// if the current of the executor is for CachingExecutor
final Cache cache = ms.getCache();
// Determine whether the current query cache.
if (executor.getClass().isAssignableFrom(CachingExecutor.class) && cache != null) {
BoundSql boundSql = ms.getBoundSql(parameter);
final CacheKey cacheKey = createCacheKey(ms, parameter, rowBounds, boundSql);
if (LOG.isDebugEnabled()) {
LOG.debug("cache executor the cache's kye is " + cacheKey);
}
cache.putObject(cacheKey, result);