Browse Source

ISLANDORA-742 forgetting objects from cache on purge.

pull/162/head
William Panting 12 years ago
parent
commit
7be2fd3122
  1. 6
      api/fedora_item.inc

6
api/fedora_item.inc

@ -274,10 +274,12 @@ class Fedora_Item {
function add_relationship($relationship, $object, $namespaceURI = RELS_EXT_URI, $literal_value = RELS_TYPE_URI) { function add_relationship($relationship, $object, $namespaceURI = RELS_EXT_URI, $literal_value = RELS_TYPE_URI) {
static $relsextxml = NULL; static $relsextxml = NULL;
if ($relsextxml === NULL) { if ($relsextxml === NULL) {
$relsextxml = new DOMDocument(); //Avoid new instantiations in long-running processes // Avoid new instantiations in long-running processes.
$relsextxml = new DOMDocument();
} }
$ds_list = $this->datastreams; $ds_list = $this->datastreams;
$f_prefix = 'info:fedora/'; $f_prefix = 'info:fedora/';
if (!array_key_exists('RELS-EXT', $ds_list)) { if (!array_key_exists('RELS-EXT', $ds_list)) {
$rdf_string = <<<RDF $rdf_string = <<<RDF
@ -978,6 +980,8 @@ RDF;
'force' => $force 'force' => $force
); );
$this->forget();
// Delete the object // Delete the object
return $this->soap_call('purgeObject', $params); return $this->soap_call('purgeObject', $params);
} }

Loading…
Cancel
Save