forked from Archives/Athou_commafeed
cache tweaks
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -15,7 +15,7 @@
|
|||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<production>false</production>
|
<production>false</production>
|
||||||
<jpa.show_sql>true</jpa.show_sql>
|
<jpa.show_sql>false</jpa.show_sql>
|
||||||
<jpa.datasource.name>java:openejb/Resource/My DataSource</jpa.datasource.name>
|
<jpa.datasource.name>java:openejb/Resource/My DataSource</jpa.datasource.name>
|
||||||
<jpa.dialect>org.hibernate.dialect.HSQLDialect</jpa.dialect>
|
<jpa.dialect>org.hibernate.dialect.HSQLDialect</jpa.dialect>
|
||||||
</properties>
|
</properties>
|
||||||
|
|||||||
@@ -1,13 +1,19 @@
|
|||||||
package com.commafeed.backend.model;
|
package com.commafeed.backend.model;
|
||||||
|
|
||||||
|
import javax.persistence.Cacheable;
|
||||||
import javax.persistence.Column;
|
import javax.persistence.Column;
|
||||||
import javax.persistence.Entity;
|
import javax.persistence.Entity;
|
||||||
import javax.persistence.Lob;
|
import javax.persistence.Lob;
|
||||||
import javax.persistence.Table;
|
import javax.persistence.Table;
|
||||||
|
|
||||||
|
import org.hibernate.annotations.Cache;
|
||||||
|
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@Table(name = "FEEDENTRYCONTENTS")
|
@Table(name = "FEEDENTRYCONTENTS")
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
|
@Cacheable
|
||||||
|
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
||||||
public class FeedEntryContent extends AbstractModel {
|
public class FeedEntryContent extends AbstractModel {
|
||||||
|
|
||||||
@Column(length = 2048)
|
@Column(length = 2048)
|
||||||
|
|||||||
@@ -5,17 +5,17 @@
|
|||||||
|
|
||||||
<diskStore path="java.io.tmpdir" />
|
<diskStore path="java.io.tmpdir" />
|
||||||
|
|
||||||
<defaultCache maxEntriesLocalHeap="10000" eternal="false"
|
<defaultCache maxEntriesLocalHeap="1000000" eternal="false"
|
||||||
timeToIdleSeconds="120" timeToLiveSeconds="120" maxEntriesLocalDisk="10000000"
|
timeToIdleSeconds="120" timeToLiveSeconds="120" maxEntriesLocalDisk="10000000"
|
||||||
diskExpiryThreadIntervalSeconds="120" memoryStoreEvictionPolicy="LRU">
|
diskExpiryThreadIntervalSeconds="120" memoryStoreEvictionPolicy="LRU">
|
||||||
<persistence strategy="localTempSwap" />
|
<persistence strategy="localTempSwap" />
|
||||||
</defaultCache>
|
</defaultCache>
|
||||||
<!--
|
|
||||||
<cache name="com.commafeed.backend.model.Feed"
|
<cache name="com.commafeed.backend.model.FeedEntryContent"
|
||||||
maxEntriesLocalHeap="100000" maxEntriesLocalDisk="1000" eternal="false"
|
maxEntriesLocalHeap="1000" eternal="false" timeToIdleSeconds="120"
|
||||||
diskSpoolBufferSizeMB="20" timeToIdleSeconds="300" timeToLiveSeconds="600"
|
timeToLiveSeconds="120" maxEntriesLocalDisk="100000"
|
||||||
memoryStoreEvictionPolicy="LFU" transactionalMode="off">
|
diskExpiryThreadIntervalSeconds="120" memoryStoreEvictionPolicy="LRU">
|
||||||
<persistence strategy="localTempSwap" />
|
<persistence strategy="localTempSwap" />
|
||||||
</cache>
|
</cache>
|
||||||
-->
|
|
||||||
</ehcache>
|
</ehcache>
|
||||||
Reference in New Issue
Block a user