--- loncom/interface/lonindexer.pm 2006/06/23 06:39:09 1.146 +++ loncom/interface/lonindexer.pm 2006/06/23 07:02:51 1.147 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Directory Indexer # -# $Id: lonindexer.pm,v 1.146 2006/06/23 06:39:09 www Exp $ +# $Id: lonindexer.pm,v 1.147 2006/06/23 07:02:51 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1162,6 +1162,11 @@ sub showpreview { $output=join("\n",); close(FH); } else { +# In update display mode, remove old cache. This is done to retroactively +# clean up course context renderings. + if (-e $cache) { + unlink($cache); + } $output=&Apache::lonnet::ssi_body($filelink); # Is access denied? Don't render, don't store if ($output=~/LONCAPAACCESSCONTROLERRORSCREEN/s) {