Skip to content

Commit

Permalink
SAK-44445 Presence polling db performance improvement (sakaiproject#8673
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ern authored Oct 13, 2020
1 parent 02f7e6b commit 693969b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ private List<PrivacyRecord> getPrivacyByContextAndTypeAndUserIds(final String co
q.setString(CONTEXT_ID, contextId);
q.setString(RECORD_TYPE, recordType);
q.setParameterList("userIds", userIds);
q.setCacheable(true);
return q.list();
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import lombok.Data;
import lombok.NoArgsConstructor;

@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
@Entity
@Table(name = "SAKAI_PRIVACY_RECORD", uniqueConstraints = @UniqueConstraint(name = "uniquePrivacyRecord", columnNames = {"contextId", "recordType", "userId"}))
@NamedQueries({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@
<bean parent="org.sakaiproject.ignite.cache.transactional">
<property name="name" value="org.sakaiproject.rubrics.logic.model.ToolItemRubricAssociation"/>
</bean>
<bean parent="org.sakaiproject.ignite.cache.transactional">
<property name="name" value="org.sakaiproject.hbm.privacy.PrivacyRecord"/>
</bean>
</list>
</property>
<property name="serverConfigurationService" ref="org.sakaiproject.component.api.ServerConfigurationService"/>
Expand Down

0 comments on commit 693969b

Please sign in to comment.