forked from Archives/Athou_commafeed
remove ehcache support as it does not provide a performance boost (fix #264)
This commit is contained in:
15
pom.xml
15
pom.xml
@@ -101,9 +101,6 @@
|
||||
<lib>org.hibernate:hibernate-validator:4.3.1.Final</lib>
|
||||
<lib>org.jboss.logging:jboss-logging:3.1.3.GA</lib>
|
||||
|
||||
<lib>net.sf.ehcache:ehcache-core:2.6.6</lib>
|
||||
<lib>org.hibernate:hibernate-ehcache:4.1.11.Final</lib>
|
||||
|
||||
<lib>dom4j:dom4j:1.6.1</lib>
|
||||
<lib>antlr:antlr:2.7.7</lib>
|
||||
<lib>remove:openjpa-</lib>
|
||||
@@ -164,18 +161,6 @@
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sf.ehcache</groupId>
|
||||
<artifactId>ehcache-core</artifactId>
|
||||
<version>2.6.6</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-ehcache</artifactId>
|
||||
<version>4.1.11.Final</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>uaihebert.com</groupId>
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.commafeed.backend.model;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.ManyToMany;
|
||||
@@ -12,8 +11,6 @@ import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
import org.hibernate.annotations.Index;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -23,8 +20,6 @@ import com.google.common.collect.Sets;
|
||||
@org.hibernate.annotations.Table(appliesTo = "FEEDS", indexes = { @Index(name = "disabled_lastupdated_index", columnNames = {
|
||||
"disabledUntil", "lastUpdated" }), })
|
||||
@SuppressWarnings("serial")
|
||||
@Cacheable
|
||||
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
||||
public class Feed extends AbstractModel {
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.commafeed.backend.model;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
@@ -11,16 +10,11 @@ import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
@Entity
|
||||
@Table(name = "FEEDCATEGORIES")
|
||||
@SuppressWarnings("serial")
|
||||
@Cacheable
|
||||
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
||||
public class FeedCategory extends AbstractModel {
|
||||
|
||||
@Column(length = 128, nullable = false)
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.commafeed.backend.model;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
@@ -18,8 +17,6 @@ import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
import javax.persistence.Transient;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
import org.hibernate.annotations.Index;
|
||||
|
||||
import com.google.api.client.util.Sets;
|
||||
@@ -27,8 +24,6 @@ import com.google.api.client.util.Sets;
|
||||
@Entity
|
||||
@Table(name = "FEEDENTRIES")
|
||||
@SuppressWarnings("serial")
|
||||
@Cacheable
|
||||
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
||||
public class FeedEntry extends AbstractModel {
|
||||
|
||||
@Column(length = 2048, nullable = false)
|
||||
|
||||
@@ -1,19 +1,13 @@
|
||||
package com.commafeed.backend.model;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Lob;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
@Entity
|
||||
@Table(name = "FEEDENTRYCONTENTS")
|
||||
@SuppressWarnings("serial")
|
||||
@Cacheable
|
||||
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
||||
public class FeedEntryContent extends AbstractModel {
|
||||
|
||||
@Column(length = 2048)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.commafeed.backend.model;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.FetchType;
|
||||
@@ -8,14 +7,9 @@ import javax.persistence.JoinColumn;
|
||||
import javax.persistence.ManyToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
@Entity
|
||||
@Table(name = "FEEDENTRYSTATUSES")
|
||||
@SuppressWarnings("serial")
|
||||
@Cacheable
|
||||
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
||||
public class FeedEntryStatus extends AbstractModel {
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
|
||||
@@ -2,7 +2,6 @@ package com.commafeed.backend.model;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
@@ -12,14 +11,9 @@ import javax.persistence.ManyToOne;
|
||||
import javax.persistence.OneToMany;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
@Entity
|
||||
@Table(name = "FEEDSUBSCRIPTIONS")
|
||||
@SuppressWarnings("serial")
|
||||
@Cacheable
|
||||
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
||||
public class FeedSubscription extends AbstractModel {
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
|
||||
@@ -3,7 +3,6 @@ package com.commafeed.backend.model;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.CascadeType;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
@@ -12,8 +11,6 @@ import javax.persistence.Table;
|
||||
import javax.persistence.Temporal;
|
||||
import javax.persistence.TemporalType;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
import org.hibernate.annotations.Index;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -21,8 +18,6 @@ import com.google.common.collect.Sets;
|
||||
@Entity
|
||||
@Table(name = "USERS")
|
||||
@SuppressWarnings("serial")
|
||||
@Cacheable
|
||||
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
||||
public class User extends AbstractModel {
|
||||
|
||||
@Column(length = 32, nullable = false, unique = true)
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.commafeed.backend.model;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.EnumType;
|
||||
@@ -10,14 +9,9 @@ import javax.persistence.JoinColumn;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
@Entity
|
||||
@Table(name = "USERROLES")
|
||||
@SuppressWarnings("serial")
|
||||
@Cacheable
|
||||
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
||||
public class UserRole extends AbstractModel {
|
||||
|
||||
public static enum Role {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.commafeed.backend.model;
|
||||
|
||||
import javax.persistence.Cacheable;
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.EnumType;
|
||||
@@ -11,14 +10,9 @@ import javax.persistence.Lob;
|
||||
import javax.persistence.OneToOne;
|
||||
import javax.persistence.Table;
|
||||
|
||||
import org.hibernate.annotations.Cache;
|
||||
import org.hibernate.annotations.CacheConcurrencyStrategy;
|
||||
|
||||
@Entity
|
||||
@Table(name = "USERSETTINGS")
|
||||
@SuppressWarnings("serial")
|
||||
@Cacheable
|
||||
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
|
||||
public class UserSettings extends AbstractModel {
|
||||
|
||||
public enum ReadingMode {
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
<property name="hibernate.order_inserts" value="true" />
|
||||
<property name="hibernate.order_updates" value="true" />
|
||||
|
||||
<property name="hibernate.cache.region.factory_class"
|
||||
value="org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory" />
|
||||
|
||||
<property name="hibernate.cache.use_second_level_cache"
|
||||
value="true" />
|
||||
<property name="hibernate.cache.use_query_cache" value="true" />
|
||||
<property name="hibernate.generate_statistics" value="true" />
|
||||
</properties>
|
||||
</persistence-unit>
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"
|
||||
updateCheck="false" monitoring="autodetect" dynamicConfig="false">
|
||||
|
||||
<diskStore path="java.io.tmpdir" />
|
||||
|
||||
<defaultCache maxEntriesLocalHeap="1000000" eternal="false"
|
||||
timeToIdleSeconds="120" timeToLiveSeconds="120" maxEntriesLocalDisk="10000000"
|
||||
diskExpiryThreadIntervalSeconds="120" memoryStoreEvictionPolicy="LRU">
|
||||
<persistence strategy="localTempSwap" />
|
||||
</defaultCache>
|
||||
|
||||
<cache name="com.commafeed.backend.model.FeedEntryContent"
|
||||
maxEntriesLocalHeap="1000" eternal="false" timeToIdleSeconds="120"
|
||||
timeToLiveSeconds="120" maxEntriesLocalDisk="100000"
|
||||
diskExpiryThreadIntervalSeconds="120" memoryStoreEvictionPolicy="LRU">
|
||||
<persistence strategy="localTempSwap" />
|
||||
</cache>
|
||||
|
||||
</ehcache>
|
||||
Reference in New Issue
Block a user