I've been trying to do some research on this and have left with more questions than answers. I understand that while developing your own server is completely legal, the cache and client are not.
However some people have claimed that Jagex supposedly dropped those copyrights to the 317 cache, making it legal to use freely:
The client it'self can be considered illegal, however if one re-writes it then you should be just fine as, from my knowledge, Jagex has released ownership of the outdated 317 cache anyway.
I have been unable to find any sort of proof or documentation for this claim. Is this true whatsoever?