I have never, ever, seen a message like that in iPhoto. Lots more details please.
This is what it says in iPhoto help
Rebuilding the thumbnail cache gives iPhoto faster access to thumbnail images and the resulting display of the photos themselves. Over time, as photos are added and removed, this cache becomes less efficient.
When iPhoto detects a reduced level of efficiency, or when you upgrade to a new version, iPhoto prompts you to rebuild the thumbnail cache. If you choose not to rebuild the thumbnail cache at the time iPhoto prompts you, iPhoto will remind you again later.
IMPORTANT: It’s a good idea to make a backup of your iPhoto library before rebuilding your thumbnail cache.
That second paragraph sounds ominous. I have "rebuilt" my cache before with no repurcussions but never saw that warning
Thank you
poppi