Caching can take many forms, simple and complex. Barring further information on what you're trying to achieve, you can start by checking out the existing cache libraries.
Screaming fools! It's nothing more than a tiny ad:
a bit of art, as a gift, the permaculture playing cards