Added dump function to debug cache