Whenever you start noticing your cakes getting brittle, not producing mushrooms, or growing mold, then that means they are done. You can dispose of them. If you have a flower box / garden, you could try dispersing the exhausted cake (if it doesn't have mold) into your soil for added nutrients. Sometimes, nature will find a way to and you will be surprised to find a few little mushrooms growing in your garden. Again, this may or may not happen, but it doesn't hurt to try.