cache resolving.

In production it would take to much time ro encode the domain on each
call, so cache it.