Commit a93f161d authored by Leigh B. Stoller's avatar Leigh B. Stoller

Some fixes to make sure that object are removed from the cache when

deleted, as for long running daemons.
parent e38602a1
...@@ -744,6 +744,9 @@ sub Delete($;$) ...@@ -744,6 +744,9 @@ sub Delete($;$)
DBQueryWarn("DELETE from experiments ". DBQueryWarn("DELETE from experiments ".
"WHERE eid='$eid' and pid='$pid'"); "WHERE eid='$eid' and pid='$pid'");
# Delete from cache.
delete($experiments{"$exptidx"});
# #
# Mark experiment destroyed. This is a backup to End() below. # Mark experiment destroyed. This is a backup to End() below.
# #
...@@ -781,6 +784,16 @@ sub Delete($;$) ...@@ -781,6 +784,16 @@ sub Delete($;$)
return 0; return 0;
} }
#
# Flush from our little cache, as for the expire daemon.
#
sub Flush($)
{
my ($self) = @_;
delete($experiments{$self->idx()});
}
# #
# Add an input file to the template. The point of this is to reduce # Add an input file to the template. The point of this is to reduce
# duplication by taking an md5 of the input file, and sharing that # duplication by taking an md5 of the input file, and sharing that
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment