From 7be2fd3122ce7660fa1307cc5684012763c70204 Mon Sep 17 00:00:00 2001 From: William Panting Date: Fri, 7 Sep 2012 13:25:22 -0300 Subject: [PATCH] ISLANDORA-742 forgetting objects from cache on purge. --- api/fedora_item.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/fedora_item.inc b/api/fedora_item.inc index e78ea88c..68361348 100644 --- a/api/fedora_item.inc +++ b/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) { static $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; + $f_prefix = 'info:fedora/'; if (!array_key_exists('RELS-EXT', $ds_list)) { $rdf_string = << $force ); + $this->forget(); + // Delete the object return $this->soap_call('purgeObject', $params); }