mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-21 18:09:20 +00:00
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:
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user