in reply to (mem)caching of ip prefixes?

Let's assume an sql-database is not an option here.

Well, you could re-invent the wheel.