Caching improvement to doclist data webscript. Should make cross-site filters quicker.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14744 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mike Hatfield
2009-06-16 15:41:04 +00:00
parent 6b7684b70f
commit 3a73abdee5

View File

@@ -4,7 +4,8 @@
const THUMBNAIL_NAME = "doclib",
PREF_FAVOURITES = "org.alfresco.share.documents.favourites";
var PeopleCache = {};
var PeopleCache = {},
SitesCache = {};
function getPerson(username)
{
@@ -15,6 +16,15 @@ function getPerson(username)
return PeopleCache[username];
}
function getSite(siteId)
{
if (typeof SiteCache[siteId] == "undefined")
{
SiteCache[siteId] = siteService.getSite(siteId);
}
return SiteCache[siteId];
}
/**
* Document List Component: doclist
*/
@@ -233,7 +243,7 @@ function getDocList(filter)
path: "/" + displayPaths.slice(5, displayPaths.length).join("/"),
file: locationAsset.name
};
location.siteTitle = siteService.getSite(location.site).title;
location.siteTitle = getSite(location.site).title;
}
else
{