Hi list

I'm making use of the riswhois service and would like to cache queries locally. However, I am not sure whether I can do it the way I want to. My idea is to store the ASN an the corresponding route of each query I execute. Before performing another query I would then check whether I already stored the ASN of a route which contains the IP for which I want to find the AS.
Can I do that? Or is then the following case possible: I store an AS an its route -- say  ASx, 123.0.0.0/8 -- whose IP range includes another one -- say ASy, 123.100.0.0/16. When I store ASx first and then query an IP of ASy, I will assign ASx to this IP instead of ASy. Is such a case possible? Or is there even another problem with my caching approach?

Thanks for your time!

Best,
Laurent