clearing cache on document destroy