Let's assume an sql-database is not an option here.
Well, you could re-invent the wheel.
In reply to Re: (mem)caching of ip prefixes? by ikegami in thread (mem)caching of ip prefixes? by Fangorn