Index: kernel-impl/src/main/java/org/sakaiproject/site/impl/BaseSiteService.java =================================================================== --- kernel-impl/src/main/java/org/sakaiproject/site/impl/BaseSiteService.java (revision 49932) +++ kernel-impl/src/main/java/org/sakaiproject/site/impl/BaseSiteService.java (working copy) @@ -562,16 +562,18 @@ // if not found if (rv == null) throw new IdUnusedException(id); - // Thanks to the SiteCacheImpl class lurking beneath the - // surface, caching the site will have the side-effect - // of doing a "loadAll()" plus more. + // get all of the site loaded + rv.loadAll(); + + // track it - we don't track site access -ggolden + // EventTrackingService.post(EventTrackingService.newEvent(SECURE_ACCESS_SITE, site.getReference())); + + // cache a copy if (m_siteCache != null) { - m_siteCache.put(siteReference(id), rv, m_cacheSeconds); - // Return a copy. - rv = new BaseSite(this, rv, true); - } else { - rv.loadAll(); + String ref = siteReference(id); + Site copy = new BaseSite(this, rv, true); + m_siteCache.put(ref, copy, m_cacheSeconds); } return rv;