diff options
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx b/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx index ca1fde461ebf..e44e08812b73 100644 --- a/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx +++ b/ucb/source/ucp/webdav-curl/webdavcontentcaps.cxx @@ -257,6 +257,8 @@ bool ContentProvider::getProperty( } +static PropertyNamesCache aStaticPropertyNamesCache; + // Content implementation. @@ -295,7 +297,21 @@ uno::Sequence< beans::Property > Content::getProperties( try { std::vector< DAVResourceInfo > props; - xResAccess->PROPFIND( DAVZERO, props, xEnv ); + OUString aTheURL( xResAccess->getURL() ); + PropertyNames aPropsNames( aTheURL ); + + if( !aStaticPropertyNamesCache.getCachedPropertyNames( aTheURL, aPropsNames ) ) + { + + xResAccess->PROPFIND( DAVZERO, props, xEnv ); + aPropsNames.setPropertiesNames( props ); + + aStaticPropertyNamesCache.addCachePropertyNames( aPropsNames, 10 ); + } + else + { + props = aPropsNames.getPropertiesNames(); + } // Note: vector always contains exactly one resource info, because // we used a depth of DAVZERO for PROPFIND. |