Apache ShardingSphere v5.5.0 document
sqlStatementCache: # SQL statement local cache initialCapacity: # Initial capacity of local cache maximumSize: # Maximum capacity of local cache parseTreeCache: # Parse tree local cache initialCapacity: # Initial Initial capacity of local cache maximumSize: # Maximum capacity of local cache Procedure 1. Set local cache configuration. 2. Set parser configuration. 3. Use a parsing engine to parse SQL. 9.1. ShardingSphere-JDBC ShardingSphere-JDBC 83 Apache ShardingSphere document Cache for Sharding Route Background This feature is experimental and needs to be used with the data sharding rule. The cache for sharding route will put the logical0 码力 | 602 页 | 3.85 MB | 1 年前3Apache ShardingSphere 5.2.0 Document
sqlStatementCache: # SQL statement local cache initialCapacity: # Initial capacity of local cache maximumSize: # Maximum capacity of local cache parseTreeCache: # Parse tree local cache initialCapacity: # Initial Initial capacity of local cache maximumSize: # Maximum capacity of local cache Procedure 1. Set local cache configuration. 2. Set parser configuration. 3. Use a parsing engine to parse SQL. Sample rules: parseTreeCache (?) CacheOption Parse syntax tree local cache configuration sqlStatementCache (?) CacheOption sql statement local cache configuration Cache option Configuration Class:org.apache.shardingsphere0 码力 | 483 页 | 4.27 MB | 1 年前3Apache ShardingSphere 5.2.1 Document
sqlStatementCache: # SQL statement local cache initialCapacity: # Initial capacity of local cache maximumSize: # Maximum capacity of local cache parseTreeCache: # Parse tree local cache initialCapacity: # Initial Initial capacity of local cache maximumSize: # Maximum capacity of local cache Procedure 1. Set local cache configuration. 2. Set parser configuration. 3. Use a parsing engine to parse SQL. Sample rules: parseTreeCache (?) CacheOption Parse syntax tree local cache configuration sqlStatementCache (?) CacheOption sql statement local cache configuration Cache option Configuration Class:org.apache.shardingsphere0 码力 | 523 页 | 4.51 MB | 1 年前3Apache ShardingSphere 5.1.1 Document
parseTreeCache (?) CacheOption Parse syntax tree local cache configuration sqlStatementCache (?) CacheOption sql statement local cache configuration Cache option Configuration Class:org.apache.shardingsphere capacity of local cache parser syntax tree lo‐ cal cache default value 128, SQL statement cache default value 2000 ma xi mu mS iz e( ?) l o n g Maximum capacity of local cache The default value value of local cache for pars‐ ing syntax tree is 1024, and the default value of sql statement cache is 65535 co nc ur re nc yL ev el i n t Local cache con‐ currency level, the maximum number of concurrent0 码力 | 458 页 | 3.43 MB | 1 年前3MyBatis 框架尚硅谷 java 研究院版本:V 1.0
你会立即发现省掉了将近 95% 的代码。MyBatis 就是针对 SQL 构建的,并且比普通 的方法做的更好。 2) SQL 映射文件有很少的几个顶级元素(按照它们应该被定义的顺序): cache – 给定命名空间的缓存配置。 cache-ref – 其他命名空间缓存配置的引用。 resultMap – 是最复杂也是最强大的元素,用来描述如何从数据库结果集中来加 载对象。 parameterMap – 已 级别的缓存。 5) 为了提高扩展性。MyBatis 定义了缓存接口 Cache。我们可以通过实现 Cache 接口来自 定义二级缓存 6.2 一级缓存的使用 1) 一级缓存(local cache), 即本地缓存, 作用域默认为 sqlSession。当 Session flush 或 close 后, 该 Session 中的所有 Cache 将被清空。 2) 本地缓存不能被关闭, 但可以调用 clearCache() SqlSession 两次查询期间执行了任何一次增删改操作 4) 同一个 SqlSession 两次查询期间手动清空了缓存 6.4 二级缓存的使用 1) 二级缓存(second level cache),全局作用域缓存 2) 二级缓存默认不开启,需要手动配置 3) MyBatis 提供二级缓存的接口以及实现,缓存实现要求 POJO 实现 Serializable 接口 4) 二级缓存在 SqlSession0 码力 | 44 页 | 926.54 KB | 1 年前3Apache ShardingSphere 5.4.1 Document
sqlStatementCache: # SQL statement local cache initialCapacity: # Initial capacity of local cache maximumSize: # Maximum capacity of local cache parseTreeCache: # Parse tree local cache initialCapacity: # Initial Initial capacity of local cache maximumSize: # Maximum capacity of local cache Procedure 1. Set local cache configuration. 2. Set parser configuration. 3. Use a parsing engine to parse SQL. 9.1. ShardingSphere-JDBC order_cipher encryptorName: aes_encryptor Cache for Sharding Route Background This feature is experimental and needs to be used with the data sharding rule. The cache for sharding route will put the logical0 码力 | 572 页 | 3.73 MB | 1 年前3Apache ShardingSphere 5.1.2 Document
parseTreeCache (?) CacheOption Parse syntax tree local cache configuration sqlStatementCache (?) CacheOption sql statement local cache configuration Cache option Configuration Class:org.apache.shardingsphere capacity of local cache parser syntax tree lo‐ cal cache default value 128, SQL statement cache default value 2000 ma xi mu mS iz e( ?) l o n g Maximum capacity of local cache The default value value of local cache for pars‐ ing syntax tree is 1024, and the default value of sql statement cache is 65535 5.1. ShardingSphere-JDBC 85 Apache ShardingSphere document, v5.1.2 Mixed Rules Configuration0 码力 | 503 页 | 3.66 MB | 1 年前3Mybatis 3.3.0 中文用户指南
A_COLUMN 到经典 Java 属性名 aColumn 的类似映 射。 true | false False localCacheScope MyBatis 利用本地 缓存机制(Local Cache)防止循环 引用(circular references)和加 速重复嵌套查询。 默认值为 SESSION,这种情 况下会缓存一个会 话中执行的所有查 询。 若设置值为 STATEMENT,本 地会话仅用在语句 (Parameters) 结果集 结果集 (Result (Result Maps) Maps) 自动映射 自动映射 (Auto- (Auto- mapping) mapping) cache cache 动态SQL 动态SQL Java API Java API SQL语句构建器 SQL语句构建器 日志 日志 Mapper XML 文件 文件 MyBatis 的真正强大在于它的 代码进行对比,你会立即发现省掉了将近 95% 的代码。MyBatis 就是针对 SQL 构建的,并且比普通的方法做的 更好。 SQL 映射文件有很少的几个顶级元素(按照它们应该被定义的顺序): cache – 给定命名空间的缓存配置。 cache-ref – 其他命名空间缓存配置的引用。 resultMap – 是最复杂也是最强大的元素,用来描述如何从数据库结果集中来加载对象。 parameterMap –0 码力 | 98 页 | 2.03 MB | 1 年前3传智播客 mybatis 框架课程讲义
name="cacheEnabled" value="true"/> 描述 允许值 默认值 cacheEnabled 对在此配置文件下的所有 cache 进行 全局性开/关设置。 true false true 要在你的 Mapper 映射文件中添加一行: <cache /> ,表示此 mapper 开启二级缓存。 6.3.3 实现序列化 二级缓存需要查询结果映射的 pojo 对象实现 java.io6.3.7 Mybatis Cache 参数 flushInterval(刷新间隔)可以被设置为任意的正整数,而且它们代表一个合理的毫秒形式 的时间段。默认情况是不设置,也就是没有刷新间隔,缓存仅仅调用语句时刷新。 size(引 false。只读的缓存会给所有调用者返回缓存对象 的相同实例。因此这些对象不能被修改。这提供了很重要的性能优势。可读写的缓存会返回 缓存对象的拷贝(通过序列化)。这会慢一些,但是安全,因此默认是 false。 如下例子: <cache eviction="FIFO" flushInterval="60000" size="512" readOnly="true"/> 这个更高级的配置创建了一个 FIFO 缓存,并每隔 60 秒刷新 0 码力 | 75 页 | 1.16 MB | 1 年前3Apache ShardingSphere v5.5.0 中文文档
ShardingSphere-JDBC 113 Apache ShardingSphere document 参数解释 类名称:org.apache.shardingsphere.sharding.api.config.cache.ShardingCacheConfiguration 可配置属性: 名称 数据类型 说明 • 默认值 * allowe dMaxSqlLength int 允许缓存的 SQL 长度 限制 cach e.ShardingCacheOptionsConfiguration 路由缓存 • 类名称:org.apache.shardingsphere.sharding.api.config.cache.ShardingCacheOptionsConfiguration 可配置属性: 名称 数据类型 说明 默认值 softValues boolean 是否软引用缓存值 • initialCapacity beans.util.Cache$Kind$2 was unintentionally initialized at build time. To see why com.sun.beans.util.Cache$Kind$2 got initialized use --trace-class- initialization=com.sun.beans.util.Cache$Kind$2 com0 码力 | 557 页 | 4.61 MB | 1 年前3
共 20 条
- 1
- 2