-
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)??3
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)什么意思??
谁有相关的帮助文档...
问题补充:讲的是不错...请问你有相关的帮助文档没...就是关于@Cache()的..
给个下载链接啥的..2010年8月29日 11:35
1个答案 按时间排序 按投票排序
-
从hibernate2.1开始ehcache已经作为hibernate的默认缓存方案(二级缓存方案 sessionfactory级别), 在项目中有针对性的使用缓存将对性能的提升右很大的帮助。
要使用 Ehcache:需要一下步骤
一,classpath添加相应的jar(ehcache,commons-logging)
二,然后在hibernate.cfg.xml中配置
<property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
<property name="cache.use_second_level_cache">true</property>
<property name="cache.use_query_cache">true</property>
说明:如果没有配置<property name="cache.use_second_level_cache">true</property>(默认false) 将会产生根据单个id查询的情况(产生很多sql)。
三,为需要缓存的类添加缓存标示:
使用mapping文件时需要添加node :
Java代码
@Entity
@Cache(usage=CacheConcurrencyStrategy.READ_ONLY)
如果使用使用hibernate annoation是使用@Cache(usage=CacheConcurrencyStrategy.)标签,有5种可选的缓存方案:
1,CacheConcurrencyStrategy.NONE
不适用,默认
2. CacheConcurrencyStrategy.NONSTRICT_READ_WRITE
更新不频繁几个小时或更长
3,CacheConcurrencyStrategy.READ_ONLY
对于不发生改变的数据使用 [size=large][/size]
4,CacheConcurrencyStrategy.READ_WRITE
基于时间戳判定机制,,对于数据同步要求严格的情况,使用频繁
5,CacheConcurrencyStrategy.TRANSACTIONAL
运行在jta环境种,基于事务2010年8月29日 18:59
相关推荐
Cascading Write Operations 10.8.6.1. Notes Regarding Cascading Operations 11. Zend_Debug 11.1. 输出变量的值 (Dumping Variables) 12. Zend_Exception 12.1. 使用“异常” 13. Zend_Feed 13.1. 介绍 ...
pcf8563_i2c1_r8_ruoge_ov2640通过给RTC驱动增加设备节点读取秒钟... printf("Usage:\n%s /dev/i2c-x start_addr reg_addr rw[0|1] [write_val]\n", argv[0]); return 0; } fd = open(argv[1], O_RDWR); ...
When you want to manipulate or cache SQL data When you need to write highly procedural data manipulation routines When you want maximum speed Features Despite its small size DbfDotNet provides a ...
<cache usage="read-write"/> <id name="id" type="java.lang.Long"> <column name="id" /> <generator class="native" /> <!-- 配置版本号,必须紧跟在id元素后面 --> <version name="version" ...
<cache usage="read-write"/> <id name="id" type="java.lang.Integer" column="id"><generator class="identity"/></id> <property name="title" column="title" type="java.lang.String" not-null="true" /> ...
Maximal size of cache for debug messages is 1MB. Some messages can be lost if frequency/size of debug messages is too big. 3.3) IRPTrace does not allow to set hook on IRPDRV driver 4) Known bugs ...
Performance and resource usage PEP 397: Python Launcher for Windows PEP 3151: Reworking the OS and IO exception hierarchy PEP 380: Syntax for Delegating to a Subgenerator PEP 409: Suppressing ...
@ get read to call C functions (for nand_read()) ldr sp, DW_STACK_START @ setup stack pointer mov fp, #0 @ no previous frame, so fp=0 @ copy U-Boot to RAM ldr r0, =TEXT_BASE mov r1, #0x0 mov r2...
-C, --cache=on/off (dis)allow server-cached data (normally allowed). --ignore-length ignore `Content-Length' header field. --header=STRING insert STRING among the headers. --proxy-user=USER set...
usage: qemu [options] [disk_image] 'disk_image' is a raw hard disk image for IDE hard disk 0 Standard options: -h or -help display this help and exit -version display version information and exit -...
Inconsistent Cache Mode Support .................................................................. 17 System Viewer Instrumentation Support ...................................................... 17 ...
Data bus and write data duplication. I/O address space and the peripherals. I/O addressing. I/O cycles. Registers. Registers overview. Segmenting. General purpose and segment registers. Flags....
Chapters: Evaluating Memory and Cache Usage Advanced Windows, 4th Edition, Jeffrey Richter, Microsoft Press Related Web Sites http://ntperformance/ Memory Definitions Memory Definitions ...
2.12 Bernoulli Cache 2.13 AT&T 6300 Computers 2.14 LANtastic 2.15 Western Digital SCSI Hard-Disk Controllers 2.16 Change CONFIG.SYS File 2.17 Toshiba T1600 and a Hard RAM Disk 3. Installing MS-...
Schema on Read Versus Schema on Write 421 Updates, Transactions, and Indexes 422 HiveQL 422 Data Types 424 Operators and Functions 426 Tables 427 Managed Tables and External Tables 427 Partitions and ...
Prior to SQL Server 7.0, REPEATABLE READ and SERIALIZABLE isolation levels were synonymous. There was no way to prevent non-repeatable reads while not preventing phantoms. By default, SQL Server 2000 ...
usage: qemu [options] [disk_image] 'disk_image' is a raw hard disk image for IDE hard disk 0 Standard options: -h or -help display this help and exit -version display version information and exit -M...
SQUASHFS 1.3r3 - A squashed read-only filesystem for Linux Copyright 2004 Phillip Lougher (phillip@lougher.demon.co.uk) Released under the GPL licence (version 2 or later). Squashfs is currently ...
SQUASHFS 2.2 - A squashed read-only filesystem for Linux Copyright 2005 Phillip Lougher (phillip@lougher.demon.co.uk) Released under the GPL licence (version 2 or later). Welcome to Squashfs ...
lightopc源代码: Internal architecture of this server toolkit has ...read-write locks and conditions). In addition to minimal usage of OLE/COM and Win32 API it provides high portability of source code.