Sounds like a cache might work. Something under CHI would allow you to experiment with various back-ends without having to write them. It would probably end up slower than what BrowserUK suggests, but you'd write less code. Depends on what's important to you.