trying to get cache to clear on window close for databse storage purposes