<!-- The InProcess section pertains to components that run inside the web server. -->
<InProcess logger="@-PKGSYSCONFDIR-@/native.logger">
+ <SessionCache type="Remoted" cleanupInterval="900" cacheTimeout="900"/>
+
<!--
To customize behavior, map hostnames and path components to applicationId and other settings.
-->
#endif\r
}\r
\r
-SessionCache::SessionCache(const DOMElement* e) : m_cacheTimeout(60*60*8)\r
+SessionCache::SessionCache(const DOMElement* e, unsigned long defaultTimeout) : m_cacheTimeout(defaultTimeout)\r
{\r
if (e) {\r
const XMLCh* tag=e->getAttributeNS(NULL,cacheTimeout);\r
if (tag && *tag) {\r
m_cacheTimeout = XMLString::parseInt(tag);\r
if (!m_cacheTimeout)\r
- m_cacheTimeout=60*60*8;\r
+ m_cacheTimeout=defaultTimeout;\r
}\r
}\r
}\r
* <dd>attribute containing maximum lifetime in seconds for unused sessions to remain in cache</dd>
* </dl>
*
- * @param e root of DOM tree to configure the cache
+ * @param e root of DOM tree to configure the cache
+ * @param defaultTimeout default cacheTimeout setting to use if none specified in DOM
*/
- SessionCache(const xercesc::DOMElement* e);
+ SessionCache(const xercesc::DOMElement* e, unsigned long defaultTimeout=3600);
- /** maximum lifetime in seconds for unused sessions to be cached */
+ /** Maximum lifetime in seconds for unused sessions to be cached. */
unsigned long m_cacheTimeout;
public:
}\r
\r
RemotedCache::RemotedCache(const DOMElement* e)\r
- : SessionCache(e), m_log(Category::getInstance(SHIBSP_LOGCAT".SessionCache")), m_root(e), m_lock(NULL), shutdown(false)\r
+ : SessionCache(e, 900), m_log(Category::getInstance(SHIBSP_LOGCAT".SessionCache")), m_root(e), m_lock(NULL), shutdown(false)\r
{\r
if (!SPConfig::getConfig().getServiceProvider()->getListenerService())\r
throw ConfigurationException("RemotedCacheService requires a ListenerService, but none available.");\r
return m_attributes;
}
const multimap<string,const Attribute*>& getIndexedAttributes() const {
- if (m_attributeIndex.empty()) {\r
- if (m_attributes.empty())\r
- unmarshallAttributes();\r
- for (vector<Attribute*>::const_iterator a = m_attributes.begin(); a != m_attributes.end(); ++a) {\r
- const vector<string>& aliases = (*a)->getAliases();\r
- for (vector<string>::const_iterator alias = aliases.begin(); alias != aliases.end(); ++alias)\r
- m_attributeIndex.insert(make_pair(*alias, *a));\r
- }\r
- }\r
- return m_attributeIndex;\r
+ if (m_attributeIndex.empty()) {
+ if (m_attributes.empty())
+ unmarshallAttributes();
+ for (vector<Attribute*>::const_iterator a = m_attributes.begin(); a != m_attributes.end(); ++a) {
+ const vector<string>& aliases = (*a)->getAliases();
+ for (vector<string>::const_iterator alias = aliases.begin(); alias != aliases.end(); ++alias)
+ m_attributeIndex.insert(make_pair(*alias, *a));
+ }
+ }
+ return m_attributeIndex;
}
const vector<const char*>& getAssertionIDs() const {
if (m_ids.empty()) {
}
SSCache::SSCache(const DOMElement* e)
- : SessionCache(e), m_log(Category::getInstance(SHIBSP_LOGCAT".SessionCache")), m_storage(NULL)
+ : SessionCache(e, 3600), m_log(Category::getInstance(SHIBSP_LOGCAT".SessionCache")), m_storage(NULL)
{
SPConfig& conf = SPConfig::getConfig();
const XMLCh* tag = e ? e->getAttributeNS(NULL,_StorageService) : NULL;