XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.9.3
    • Fix Version/s: 10.0, 11.0
    • Component/s: Common
    • Labels:
      None

      Description

      Remove bean from:
      common/privacy-components/src/webapp/WEB-INF/components.xml- <property name="cacheName"><value>org.sakaiproject.api.privacy.PrivacyManager.PrivacyQueryCache.queryGetPrivacy</value></property>

      Used in:
      common/privacy-comp-impl/src/java/org/sakaiproject/component/privacy/PrivacyManagerImpl.java

      memory.org.sakaiproject.api.privacy.PrivacyManager.PrivacyQueryCache.queryGetPrivacy=maxElementsInMemory=3000,timeToLiveSeconds=900,timeToIdleSeconds=900

      Added in SAK-14260:
      This is actually used as hibernate cache only which is a little odd. Removing it will likely require changing the method to use the cache before and after the hibernate call rather than trying to make a Sakai Cache into a hibernate cache.

      private PrivacyRecordImpl getPrivacy(final String contextId, final String userId, final String recordType)
      {
      if (contextId == null || userId == null || recordType == null)

      { throw new IllegalArgumentException("Null Argument in getPrivacy"); }

      HibernateCallback hcb = new HibernateCallback()
      {
      public Object doInHibernate(Session session) throws HibernateException,
      SQLException

      { Query q = session.getNamedQuery(QUERY_BY_USERID_CONTEXTID_TYPEID); q.setCacheable(true); q.setCacheRegion("org.sakaiproject.api.privacy.PrivacyManager.PrivacyQueryCache.queryGetPrivacy"); q.setParameter(CONTEXT_ID, contextId, Hibernate.STRING); q.setParameter(USER_ID, userId, Hibernate.STRING); q.setParameter(RECORD_TYPE, recordType, Hibernate.STRING); return q.uniqueResult(); }

      };

      return (PrivacyRecordImpl) getHibernateTemplate().execute(hcb);

      Stats are varied:
      org.sakaiproject.api.privacy.PrivacyManager.PrivacyQueryCache.queryGetPrivacy: count:0 hits:0 misses:0 hit%:0
      AND:
      org.sakaiproject.api.privacy.PrivacyManager.PrivacyQueryCache.queryGetPrivacy: count:520 hits:1065 misses:610 hit%:63

        Gliffy Diagrams

          Zeplin

            Attachments

              Activity

                People

                Assignee:
                aaronz Aaron Zeckoski (Inactive)
                Reporter:
                aaronz Aaron Zeckoski (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration