Mycat 缓存支持 ehcache,mapdb,leveldb,通过配置文件 cacheservice.properties,决定使用种缓存。
缓存的代码在 org.opencloudb.cache 和 org.opencloudb.cache.impl 包中。
查看缓存信息:show @@cache;
+-------------------------------------+-------+------+--------+------+------+---------------+---------------+
| CACHE | MAX | CUR | ACCESS | HIT | PUT | LAST_ACCESS | LAST_PUT |
+-------------------------------------+-------+------+--------+------+------+---------------+---------------+
| SQLRouteCache | 10000 | 0 | 0 | 0 | 0 | 0 | 0 |
| TableID2DataNodeCache.TESTDB_ORDERS | 50000 | 0 | 0 | 0 | 0 | 0 | 0 |
| ER_SQL2PARENTID | 1000 | 1 | 2 | 1 | 1 | 1429630708823 | 14