Browse Source

Fix Bug #797735: Make document caching configurable

tags/v1.2.0
Sebastian Meyer 11 years ago
parent
commit
00fffce23a
  1. 12
      dlf/common/class.tx_dlf_document.php
  2. 5
      dlf/ext_conf_template.txt

12
dlf/common/class.tx_dlf_document.php

@ -346,10 +346,18 @@ class tx_dlf_document {
// Create new instance...
$instance = new self($uid, $pid);
// ...and save it to registry and session.
// ...and save it to registry.
self::$registry[$instance->uid] = $instance;
tx_dlf_helper::saveToSession(self::$registry, get_class($instance));
// Load extension configuration
$_extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['dlf']);
// Save document to session if caching is enabled.
if (!empty($_extConf['caching'])) {
tx_dlf_helper::saveToSession(self::$registry, get_class($instance));
}
// Return new instance.
return $instance;

5
dlf/ext_conf_template.txt

@ -1,9 +1,12 @@
# cat=Basic; type=string; label=DLF User-Agent: (default is "Digital Library Framework")
# cat=Basic; type=string; label=DLF User-Agent: (default is "Goobi.Presentation")
useragent = Goobi.Presentation
# cat=Basic; type=string; label=Additional METS fileGrps: comma-separated list of @USE attribute values (default is "MIN,MAX")
fileGrps = MIN,MAX
# cat=Basic; type=boolean; label=Cache parsed METS files: caching improves performance a little bit but can result in a very large "fe_session_data" table (default is "false")
caching = 0
# cat=Solr; type=user[EXT:dlf/hooks/class.tx_dlf_em.php:tx_dlf_em->checkSolrConnection]; label=Solr Connection
solrConnect = 0

Loading…
Cancel
Save