OJS 3.3.0.7 - overriding Plugin Templates

Hi all,

I want to override a template from another plugin, like this:

import('lib.pkp.classes.plugins.GenericPlugin');
class TemplateOverrideExamplePlugin extends GenericPlugin {
	public function register($category, $path, $mainContextId = NULL) {
		$success = parent::register($category, $path);
 		if ($success && $this->getEnabled()) {
			HookRegistry::register('TemplateResource::getFilename', array($this, '_overridePluginTemplates'));
		}
		return $success;
	}
}

and then placing the tpl file inside the new Plugin. Works perfect.

The Problem is: OJS does not forget the the Template, when I disable the new Plugin. Even if I deinstall the overriding Plugin, the new template remains in the cache.
The solution is to empty the cache.
Is this a bug? Or is there a method to trigger some action (deleting the cache) when a plugin is disabled or deinstalled?

Kind Regards